From: C. <gre...@ei...> - 2004-03-25 14:20:41
|
Hello, I try to make an xQuery (eXist-1.0b1) with this simple java code (in a servlet): --------------------------------------------------------------- Class cl = Class.forName(existDBDriver); Database database = (Database)cl.newInstance(); database.setProperty("create-database", "true"); DatabaseManager.registerDatabase(database); Collection col = DatabaseManager.getCollection(existDefaultDB, accessUser, accessPwd); System.out.println("> Collection received!"); XQueryService service = (XQueryService) col.getService("XQueryService", "1.0"); System.out.println("> Service initialized!"); service.setProperty("indent", "yes"); CompiledExpression compiled = service.compile(xQuery); System.out.println("> XQuery compiled!"); ResourceSet result = service.execute(compiled); ResourceIterator i = result.getIterator(); while(i.hasMoreResources()) { Resource r = i.nextResource(); xQResult += (String)r.getContent(); } ---------------------------------------------------------------- But the same exception always occured : org.xmldb.api.base.XMLDBException: java.lang.NoSuchMethodException: org.exist.xmlrpc.RpcAPI.queryP(org.exist.security.User, [B, java.util.Hashtable) at org.exist.xmldb.RemoteXPathQueryService.query (RemoteXPathQueryService.java:52) at org.exist.xmldb.RemoteXPathQueryService.query (RemoteXPathQueryService.java:31) at mima.serverside.servlets.XQueryTest.processRequest (XQueryTest.java:118) at mima.serverside.servlets.XQueryTest.doPost(XQueryTest.java:191) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) Thanks for your help Grégoire |