You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Susanna Sjöholm <Su...@hiq.se> on 2004/12/16 15:35:17 UTC
NullpointerException when validating on Tomcat
Hi,
I have successfully compiled a schema (using XMLBeans 1.0.3) into a jar.
When using the generated classes in a standalone test app, parsing and
validating an instance document works fine.
But when running the same code inside a web app, on Tomcat 5.0, I get this
error when validating (using exactly the same instance document):
java.lang.NullPointerException
at
org.apache.xmlbeans.impl.validator.Validator.beginEvent(Validator.java:322)
at
org.apache.xmlbeans.impl.validator.Validator.nextEvent(Validator.java:187)
at
org.apache.xmlbeans.impl.store.Saver$ValidatorSaver.emitEvent(Saver.java:375
7)
at
org.apache.xmlbeans.impl.store.Saver$ValidatorSaver.emitEvent(Saver.java:372
0)
at
org.apache.xmlbeans.impl.store.Saver$ValidatorSaver.emitContainer(Saver.java
:3642)
at
org.apache.xmlbeans.impl.store.Saver.processContainer(Saver.java:775)
at org.apache.xmlbeans.impl.store.Saver.process(Saver.java:518)
at
org.apache.xmlbeans.impl.store.Saver$ValidatorSaver.<init>(Saver.java:3546)
at org.apache.xmlbeans.impl.store.Type.validate(Type.java:280)
at
org.apache.xmlbeans.impl.values.XmlObjectBase.validate(XmlObjectBase.java:31
0)
at se.hiq.mytest.XmlDocHelper.validate(XmlDocHelper.java:31)
The generated XMLBeans jar has then been deployed in the WEB-INF/lib
directory inside a war.
However, if I instead deploy the jar separately in Tomcat's common/lib
directory, it works fine (as in the standalone app)! But I would rather not
want to do that, since the XMLBeans classes are only to be used by the web
app, and besides we want a single war to deploy.
Any ideas? Tomcat issue or XMLBeans issue? (But it seems XMLBeans does not
handle the error correctly anyhow.)
Thankful for any help.
Regards,
Susanna
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org