You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Dan Diephouse <da...@envoisolutions.com> on 2004/12/06 20:35:49 UTC

NullPointerException / weird ClassLoader issues

I just updated to CVS head from a CVS snapshot from a couple weeks ago.  
When I switch to the newer version I get exceptions like so when 
creating XmlObjects:

Testcase: testControl(org.controlhaus.amazon.AmazonClientTest):    
Caused an ERROR
null
java.lang.ExceptionInInitializerError
   at 
com.amazon.webservices.awseCommerceService.x20041019.ItemLookupDocument$Factory.newInstance(Unknown 
Source)
   at 
org.controlhaus.amazon.AmazonClientTest.testControl(AmazonClientTest.java:40) 

....
Caused by: java.lang.NullPointerException
   at org.apache.xmlbeans.XmlBeans.<clinit>(XmlBeans.java:41)
   ... 70 more

When XmlBeans is instantiated, it has the following lines:

40: Package pkg = XmlBeans.class.getPackage();
41: XMLBEANS_TITLE = pkg.getImplementationTitle();

The package is evidentally "null" which signifies some kind of 
classloader IMO.  This happens when I try and instantiate XmlObjects or 
my own schema derived types. This happens when running unit tests from 
Maven. It doesn't appear to happen when I'm in my IDE. Any ideas on what 
change might have caused this?

- Dan

-- 
Dan Diephouse
Envoi Solutions LLC
http://envoisolutions.com/people/dan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org