You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by maxpid <ma...@pid.it> on 2007/01/20 11:24:19 UTC
java.lang.ExceptionInInitializerError
Hi all
I'm new to XmlBeans. Trying to make some small test program ( using the
easypo schema bundled with XmlBean release ) I faced the following error
that happen with both version of XmlBean I'm trying ( 2.2.0 and 1.0.4 ) with
jdk1.5.0.
The stack trace I'm posting is the one I obtain from the XmlBean 1.0.4
version.
Any suggestion ? ( p.s. the scomp seems to run ok creating the jar I need )
Thanks in advance
-Max
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.easypo.XmlPurchaseOrderDocumentBean.<clinit>(Unknown Source)
at com.easypo.XmlPurchaseOrderDocumentBean$Factory.newInstance(Unknown
Source)
at Xml1.main(Xml1.java:28)
Caused by: java.lang.RuntimeException: Could not instantiate
SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is the
version of xbean.jar correct?
at
schema.system.s7192534EDE55BE5779EE392E1D46F8F5.TypeSystemHolder.loadTypeSystem(Unknown
Source)
at
schema.system.s7192534EDE55BE5779EE392E1D46F8F5.TypeSystemHolder.<clinit>(Unknown
Source)
... 3 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
... 5 more
Caused by: java.lang.NullPointerException
at
org.apache.xmlbeans.impl.schema.ClassLoaderResourceLoader.getResourceAsStream(ClassLoaderResourceLoader.java:31)
at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.getLoaderStream(SchemaTypeSystemImpl.java:1678)
at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(SchemaTypeSystemImpl.java:1067)
at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(SchemaTypeSystemImpl.java:271)
at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystemImpl.java:151)
... 9 more
The simple code I'm trying to run is
public class Xml1 {
public static void main(String[] args) {
try
{
XmlPurchaseOrderDocumentBean empDoc =
XmlPurchaseOrderDocumentBean.Factory.newInstance();
}
catch ( Exception e)
{
}
}
}
--
View this message in context: http://www.nabble.com/java.lang.ExceptionInInitializerError-tf3044684.html#a8463548
Sent from the Xml Beans - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: java.lang.ExceptionInInitializerError
Posted by maxpid <ma...@pid.it>.
It happens only when I launch it from inside Eclipse IDE
If I run it outside ( dos console ) it works fine
--
View this message in context: http://www.nabble.com/java.lang.ExceptionInInitializerError-tf3044684.html#a8466500
Sent from the Xml Beans - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org