XQuery Exception during application execution

I’ve made a web application which gives the possibility to the user to make xml-document requests to a Tamino database.
The requests are translated in XQuery and the application calls Quip to submit the queries to Tamino.

The application is based on EJB technology and needs Xerces, Xalan, Quip, Crimson, Servlet and ejb libraries.

The problem I encounter now is that when I compile the application JAVA code with JBuilder, I make a temporal Main function to test if the requests are correctly created.
During this tests I encountered the following error:

com.softwareag.xtools.quip.xqueryAPI.XQueryException:
org.apache.xerces.dom.DocumentImpl

Having verificated my libraries, everything seemed to be OK but the application still gave that error, so I decided to delete all the libraries, and to reinsert them…and it worked !!!

Very surprised by this, I thought it was just a bug from JBuilder…
Then I got rif of my Main function, and packed the whole application in a jar-file which I gave to Orion Server. The application deploys without any error, the beginning is also OK, but as soon as I want to do a request, the application rises an error message…guess what…

com.softwareag.xtools.quip.xqueryAPI.XQueryException:
org.apache.xerces.dom.DocumentImpl

Knowing that the libraries I give to Orion are exactly the same as the libraries I use in JBuilder (Xerces, Xalan, Quip, Crimson, ejb, Servlet), Do you have an idea where the problem could come from ?

the error appears when Quip executes the Query:


at com.softwareag.xtools.quip.xqueryAPI.QuiPConnection.executeQuery(QuiPConnection.java:72)

I had a short look at this.

The problem is xerces.

The error
occur when the internal XQueryX representation
is created. Quip uses crimson for this. Eventually
it calls the wrire function on this:
((XmlDocument)document).write(dest);

From what I see, xerce seems to be getting in the way. I guess what might happen is. If you do not have xerces in your classpath, everything works fine, otherwise it depends where in in your classpath xerces is found. Things will probable work if xerces.jar is the last entry in your classpath.

Sven Eric