You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Graham Leggett <mi...@sharp.fm> on 2005/03/13 20:04:35 UTC
Factory.newInstance() fails with NullPointerException
Hi all,
I have managed to get XMLBeans v2.0.0beta1 to generate code for my XSDs,
however when I try and create a new instance of the XmlObject it bombs
out as below.
Is there something special I need to do before instantiating objects, or
have I found a bug?
InsuranceDocument document = InsuranceDocument.Factory.newInstance();
Caused by: java.lang.ExceptionInInitializerError
at
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.<clinit>(SchemaTypeLoaderImpl.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.xmlbeans.XmlBeans.getContextTypeLoader(XmlBeans.java:317)
at
za.co.fma.patricia.xml.insurance.InsuranceDocument$Factory.newInstance(InsuranceDocument.java:150)
Caused by: java.lang.NullPointerException
at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<clinit>(SchemaTypeSystemImpl.java:150)
... 23 more
Regards,
Graham
--
Re: Factory.newInstance() fails with NullPointerException
Posted by Graham Leggett <mi...@sharp.fm>.
David Jencks wrote:
> I already found it :-(
>
>> http://issues.apache.org/jira/browse/XMLBEANS-116
>
>
> This issue is preventing Geronimo from moving to xmlbeans v2.
>
> Please vote for this issue and encourage the xmlbeans committers to fix
> it.
I just did.
Is it possible to post the patch that is in Jira here? The patch in Jira
has got mangled by the browser and won't apply.
Regards,
Graham
--
Re: Factory.newInstance() fails with NullPointerException
Posted by David Jencks <da...@yahoo.com>.
I already found it :-(
> http://issues.apache.org/jira/browse/XMLBEANS-116
This issue is preventing Geronimo from moving to xmlbeans v2.
Please vote for this issue and encourage the xmlbeans committers to fix
it.
thanks
david jencks
On Mar 13, 2005, at 11:04 AM, Graham Leggett wrote:
> Hi all,
>
> I have managed to get XMLBeans v2.0.0beta1 to generate code for my
> XSDs, however when I try and create a new instance of the XmlObject it
> bombs out as below.
>
> Is there something special I need to do before instantiating objects,
> or have I found a bug?
>
> InsuranceDocument document = InsuranceDocument.Factory.newInstance();
>
> Caused by: java.lang.ExceptionInInitializerError
> at
> org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl.<clinit>(SchemaTyp
> eLoaderImpl.java:59)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
> va:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
> rImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> org.apache.xmlbeans.XmlBeans.getContextTypeLoader(XmlBeans.java:317)
> at
> za.co.fma.patricia.xml.insurance.InsuranceDocument$Factory.newInstance(
> InsuranceDocument.java:150)
> Caused by: java.lang.NullPointerException
> at
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<clinit>(SchemaTyp
> eSystemImpl.java:150)
> ... 23 more
>
> Regards,
> Graham
> --
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org