Hi! I want to execute an XQuery to recieve an DOM-Document.
The query worked with JDOM, but with the DOMObjectModel I get the following error:
java.lang.NoClassDefFoundError: org/w3c/dom/ranges/DocumentRange
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:727)
at java.lang.ClassLoader.loadClass(ClassLoader.java:284)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.apache.xerces.util.ObjectFactory.findProviderClass(Unknown Source)
at org.apache.xerces.parsers.AbstractDOMParser.setDocumentClassName(Unknown Source)
at org.apache.xerces.parsers.AbstractDOMParser.reset(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMReader.read(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMReader.read(Unknown Source)
at com.softwareag.tamino.db.API.objectModel.dom.TDOMReader.read(Unknown Source)
at com.softwareag.tamino.db.API.response.dom.TDOMInputStreamInterpreter.doInterpret(Unknown Source)
at com.softwareag.tamino.db.API.response.TInputStreamInterpreter.interpret(Unknown Source)
at com.softwareag.tamino.db.API.response.TResponseBuilderImpl.doBuild(Unknown Source)
at com.softwareag.tamino.db.API.response.TResponseBuilderImpl.buildForXML(Unknown Source)
at com.softwareag.tamino.db.API.accessor.TXMLObjectAccessorImpl.xquery(Unknown Source)
at barth.database.DBDataModify.XQueryXML(DBDataModify.java:150)
I do the following. I get an Accessor and with this I want to execute the XQuery. See my code:
[i]public TXMLObjectAccessor getDOMXMLAccessor(String Collection) {
TXMLObjectAccessor a = null;
if (isConnected()) {
a = Connection.newXMLObjectAccessor(TAccessLocation.newInstance(Collection),
TDOMObjectModel.getInstance());
accessors.add(a);
}
return a;
}
public Vector XQueryXML(String coll, String query)
throws NoDatabaseNameException {
Vector vec = new Vector();
Integer ergebnis = new Integer(-1);
if (dbCon.ConnectDB(dbName, dbUser, dbPass)) {
TXQuery txquery = TXQuery.newInstance(query);
TXMLObjectAccessor accessor = getDOMXMLAccessor(coll);
if (accessor != null) {
try {
TResponse response = accessor.xquery(txquery); //Here I get the ERROR
if (response.getReturnValue().equals(“0”)) {
System.err.println(response.getFirstXMLObject().toString());
}
…[/i]