On 27/05/12 17:08, Milorad Tosic wrote:
Hi,

When we started to use Jena, we had a similar problem: under Tomcat everything 
was fine but under Resin we got Xerces related exception. We solve it by adding 
the following configuration:

<web-app  xmlns="http://caucho.com/ns/resin";>

   <!-- xml -->
   <system-property javax.xml.parsers.DocumentBuilderFactory=
                
"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>
   <system-property javax.xml.parsers.SAXParserFactory=
                "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
</web-app>

It may help you too?

Milorad

On 27/05/12 16:41, Barbara Lerner wrote:
> I am still stuck on this.  xerces is also include in the jdk classes,
> but it uses a different package name there, so that shouldn't cause
> confusion, should it?

No - it does not usually but there can be fun and games about finding the factories. I encountered a related-but-different issue with finding the javax.xml.DatatypeFactory although ti did not cause a problem because the built-in one and the xerces one were sufficiently similar.

I think Milorad's system-property setting might be a more general solution - try setting system properties very early in your program.

See the javadoc for DocumentBuilderFactory.newInstance which has advice for debugging problems with DocumentBuilder which might be applicable.

In tomcat, there used to be endorsed jars on top of the JDK ones.

My other thought is whether laser.juliette.driver.Driver.main
is doing anything else that might initialize something before calling Jena at all.

If you solve this, please do let the list know,

        Andy

Reply via email to