You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-user@xml.apache.org by Lance Robertson <la...@jda.com> on 2004/02/06 22:06:47 UTC

Problems with initialization (ExceptionInInitializerError)

Ok, thanks to the invaluable help on this list I've gotten my xmlbeans stuff
to deploy and am now working on actually building an object to get it to
save out the XML for us. I"ve got a server side EJB in which I try the
following line:
 
TimeslipsDocument  allTimeslipsDocument =
TimeslipsDocument.Factory.newInstance();

When it hits this line everything blows to all bloody heck :) The error I
receive is below.  From looking through the error it's looking like some
problem with SchemaTypeSystemImpl. My xbean.jar is the same file that I used
for my rapid prototype and it works just fine there (It's not "deployed"
there just run) but the xbean.jar is should be the same either way. Does
anyone have a thought on what this might be? I'd appreciate any pointers or
help anyone could offer.
 

Lance
 
 
 
796437 [eodProcesses] ERROR root  -
java.rmi.RemoteException: EJB Exception: ; nested exception is:
        java.lang.ExceptionInInitializerError
        at
weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108
)
        at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:284)
        at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:244)
        at
com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_E
OImpl_811_WLStub.startExport(Unknown Source)
        at
com.jda.portfolio.pos.client.process.eod.process.timeslip.TimeSlipExportProc
ess.run(TimeSlipExportProcess.java:47)
        at
com.jda.portfolio.pos.client.action.backoffice.eod.EndOfDayProcessController
$2.run(EndOfDayProcessController.java:143)
Caused by: java.lang.ExceptionInInitializerError
        at
com.jda.portfolio.hostexport.base.xmlbean.TimeslipsDocument.<clinit>(Timesli
psDocument.java:19)
        at
com.jda.portfolio.hostexport.base.xmlbean.TimeslipsDocument$Factory.newInsta
nce(TimeslipsDocument.java:337)
        at
com.jda.portfolio.hostexport.server.exporthandler.timeslip.ExportTimeslipHan
dler.startExport(ExportTimeslipHandler.java:48)
        at
com.jda.portfolio.hostexport.server.service.ExportHostSystemServiceBean.star
tExport(ExportHostSystemServiceBean.java:90)
        at
com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_E
OImpl.startExport(ExportHostSystemService_hxut8w_EOImpl.java:98)
        at
com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_E
OImpl_WLSkel.invoke(Unknown Source)
        at
weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466)
        at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
:108)
        at
weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409)
        at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:353)
        at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
        at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404)
        at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
0)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Caused by: java.lang.RuntimeException: Could not instantiate
SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is the
version of xbean.jar correct?
        at
schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.loadTypeSys
tem(TypeSystemHolder.java:12)
        at
schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.<clinit>(Ty
peSystemHolder.java:6)
        ... 15 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at
schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.loadTypeSys
tem(TypeSystemHolder.java:10)
        ... 16 more
Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: XML-BEANS compiled
schema: Could not locate compiled schema resource
schema/system/sA2D1A7E239AD9DCB87A48FDC362C6133/index.xsb
(schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.index) - code 0
        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(Schema
TypeSystemImpl.java:1110)
        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(SchemaTy
peSystemImpl.java:312)
        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystem
Impl.java:192)
        ... 21 more

 

Re: Problems with initialization (ExceptionInInitializerError)

Posted by Marius Gleeson <mg...@subscribe.audumla.net>.
Looks like it could be a classloader issue. The XMlbeans Schema type
loader uses the classloader attached to the current thread to look for
its scheams. It could be that the webserver container you are using is
not setting the current threads classloader, and therefore isnt using the
classloader that is associated with your web context.

You could try putting this before you access the xmlbeans code,
Thread.currentThread().setContextClassLoader( XXXX.class.getClassLoader()
);

Where XXXX is the name of one of your classes that you know has access to
the XmlBeans generated classes.
Marius.


On Fri, 6 Feb 2004 14:06:47 -0700 , "Lance Robertson"
<la...@jda.com> said:
> Ok, thanks to the invaluable help on this list I've gotten my xmlbeans
> stuff
> to deploy and am now working on actually building an object to get it to
> save out the XML for us. I"ve got a server side EJB in which I try the
> following line:
>  
> TimeslipsDocument  allTimeslipsDocument =
> TimeslipsDocument.Factory.newInstance();
> 
> When it hits this line everything blows to all bloody heck :) The error I
> receive is below.  From looking through the error it's looking like some
> problem with SchemaTypeSystemImpl. My xbean.jar is the same file that I
> used
> for my rapid prototype and it works just fine there (It's not "deployed"
> there just run) but the xbean.jar is should be the same either way. Does
> anyone have a thought on what this might be? I'd appreciate any pointers
> or
> help anyone could offer.
>  
> 
> Lance
>  
>  
>  
> 796437 [eodProcesses] ERROR root  -
> java.rmi.RemoteException: EJB Exception: ; nested exception is:
>         java.lang.ExceptionInInitializerError
>         at
> weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108
> )
>         at
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
> :284)
>         at
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
> :244)
>         at
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_E
> OImpl_811_WLStub.startExport(Unknown Source)
>         at
> com.jda.portfolio.pos.client.process.eod.process.timeslip.TimeSlipExportProc
> ess.run(TimeSlipExportProcess.java:47)
>         at
> com.jda.portfolio.pos.client.action.backoffice.eod.EndOfDayProcessController
> $2.run(EndOfDayProcessController.java:143)
> Caused by: java.lang.ExceptionInInitializerError
>         at
> com.jda.portfolio.hostexport.base.xmlbean.TimeslipsDocument.<clinit>(Timesli
> psDocument.java:19)
>         at
> com.jda.portfolio.hostexport.base.xmlbean.TimeslipsDocument$Factory.newInsta
> nce(TimeslipsDocument.java:337)
>         at
> com.jda.portfolio.hostexport.server.exporthandler.timeslip.ExportTimeslipHan
> dler.startExport(ExportTimeslipHandler.java:48)
>         at
> com.jda.portfolio.hostexport.server.service.ExportHostSystemServiceBean.star
> tExport(ExportHostSystemServiceBean.java:90)
>         at
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_E
> OImpl.startExport(ExportHostSystemService_hxut8w_EOImpl.java:98)
>         at
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_E
> OImpl_WLSkel.invoke(Unknown Source)
>         at
> weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466)
>         at
> weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
> :108)
>         at
> weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409)
>         at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
> t.java:353)
>         at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
>         at
> weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404)
>         at
> weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
> 0)
>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> Caused by: java.lang.RuntimeException: Could not instantiate
> SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is
> the
> version of xbean.jar correct?
>         at
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.loadTypeSys
> tem(TypeSystemHolder.java:12)
>         at
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.<clinit>(Ty
> peSystemHolder.java:6)
>         ... 15 more
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
> sorImpl.java:39)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
> torAccessorImpl.java:27)
>         at
>         java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.loadTypeSys
> tem(TypeSystemHolder.java:10)
>         ... 16 more
> Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: XML-BEANS
> compiled
> schema: Could not locate compiled schema resource
> schema/system/sA2D1A7E239AD9DCB87A48FDC362C6133/index.xsb
> (schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.index) - code 0
>         at
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(Schema
> TypeSystemImpl.java:1110)
>         at
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(SchemaTy
> peSystemImpl.java:312)
>         at
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystem
> Impl.java:192)
>         ... 21 more
> 
>  

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Re: Problems with initialization (ExceptionInInitializerError)

Posted by Toby H Ferguson <to...@Sun.COM>.
A quick reply (i.e. not a lot of thought!) but it looks as if the class 
loader is not permitting the SchemaTypeLoader to get at its index.xsb 
(whatever that is!). I don't know if that's in some other location but 
I'd bet a pound (sterling) to a pinch of pig-shit (as we say in the UK) 
that its along those lines. See if you can (by hand) find the very thing 
its complaining about near the bottom of this trace - if you can then 
your problem is that you can find it, but the system can't: i.e. you've 
got to figure out where the system wants it to be so that your 
application can see it - try sticking it directly in with the app!

Toby H Ferguson

Lance Robertson wrote:

> Ok, thanks to the invaluable help on this list I've gotten my xmlbeans 
> stuff to deploy and am now working on actually building an object to 
> get it to save out the XML for us. I"ve got a server side EJB in which 
> I try the following line:
>  
> TimeslipsDocument  allTimeslipsDocument = 
> TimeslipsDocument.Factory.newInstance();
> When it hits this line everything blows to all bloody heck :) The 
> error I receive is below.  From looking through the error it's looking 
> like some problem with SchemaTypeSystemImpl. My xbean.jar is the same 
> file that I used for my rapid prototype and it works just fine there 
> (It's not "deployed" there just run) but the xbean.jar is should be 
> the same either way. Does anyone have a thought on what this might be? 
> I'd appreciate any pointers or help anyone could offer.
>  
>
> Lance
>  
>  
>  
> 796437 [eodProcesses] ERROR root  -
> java.rmi.RemoteException: EJB Exception: ; nested exception is:
>         java.lang.ExceptionInInitializerError
>         at 
> weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
>         at 
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
>         at 
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
>         at 
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_EOImpl_811_WLStub.startExport(Unknown 
> Source)
>         at 
> com.jda.portfolio.pos.client.process.eod.process.timeslip.TimeSlipExportProcess.run(TimeSlipExportProcess.java:47)
>         at 
> com.jda.portfolio.pos.client.action.backoffice.eod.EndOfDayProcessController$2.run(EndOfDayProcessController.java:143)
> Caused by: java.lang.ExceptionInInitializerError
>         at 
> com.jda.portfolio.hostexport.base.xmlbean.TimeslipsDocument.<clinit>(TimeslipsDocument.java:19)
>         at 
> com.jda.portfolio.hostexport.base.xmlbean.TimeslipsDocument$Factory.newInstance(TimeslipsDocument.java:337)
>         at 
> com.jda.portfolio.hostexport.server.exporthandler.timeslip.ExportTimeslipHandler.startExport(ExportTimeslipHandler.java:48)
>         at 
> com.jda.portfolio.hostexport.server.service.ExportHostSystemServiceBean.startExport(ExportHostSystemServiceBean.java:90)
>         at 
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_EOImpl.startExport(ExportHostSystemService_hxut8w_EOImpl.java:98)
>         at 
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_EOImpl_WLSkel.invoke(Unknown 
> Source)
>         at 
> weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466)
>         at 
> weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
>         at 
> weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409)
>         at 
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
>         at 
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
>         at 
> weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404)
>         at 
> weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> Caused by: java.lang.RuntimeException: Could not instantiate 
> SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is 
> the version of xbean.jar correct?
>         at 
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.loadTypeSystem(TypeSystemHolder.java:12)
>         at 
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.<clinit>(TypeSystemHolder.java:6)
>         ... 15 more
> Caused by: java.lang.reflect.InvocationTargetException
>         at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at 
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.loadTypeSystem(TypeSystemHolder.java:10)
>         ... 16 more
> Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: XML-BEANS 
> compiled schema: Could not locate compiled schema resource 
> schema/system/sA2D1A7E239AD9DCB87A48FDC362C6133/index.xsb 
> (schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.index) - code 0
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(SchemaTypeSystemImpl.java:1110)
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(SchemaTypeSystemImpl.java:312)
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystemImpl.java:192)
>         ... 21 more
>  


Re: Problems with initialization (ExceptionInInitializerError)

Posted by Marius Gleeson <mg...@subscribe.audumla.net>.
Looks like it could be a classloader issue. The XMlbeans Schema type
loader uses the classloader attached to the current thread to look for
its scheams. It could be that the webserver container you are using is
not setting the current threads classloader, and therefore isnt using the
classloader that is associated with your web context.

You could try putting this before you access the xmlbeans code,
Thread.currentThread().setContextClassLoader( XXXX.class.getClassLoader()
);

Where XXXX is the name of one of your classes that you know has access to
the XmlBeans generated classes.
Marius.


On Fri, 6 Feb 2004 14:06:47 -0700 , "Lance Robertson"
<la...@jda.com> said:
> Ok, thanks to the invaluable help on this list I've gotten my xmlbeans
> stuff
> to deploy and am now working on actually building an object to get it to
> save out the XML for us. I"ve got a server side EJB in which I try the
> following line:
>  
> TimeslipsDocument  allTimeslipsDocument =
> TimeslipsDocument.Factory.newInstance();
> 
> When it hits this line everything blows to all bloody heck :) The error I
> receive is below.  From looking through the error it's looking like some
> problem with SchemaTypeSystemImpl. My xbean.jar is the same file that I
> used
> for my rapid prototype and it works just fine there (It's not "deployed"
> there just run) but the xbean.jar is should be the same either way. Does
> anyone have a thought on what this might be? I'd appreciate any pointers
> or
> help anyone could offer.
>  
> 
> Lance
>  
>  
>  
> 796437 [eodProcesses] ERROR root  -
> java.rmi.RemoteException: EJB Exception: ; nested exception is:
>         java.lang.ExceptionInInitializerError
>         at
> weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108
> )
>         at
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
> :284)
>         at
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
> :244)
>         at
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_E
> OImpl_811_WLStub.startExport(Unknown Source)
>         at
> com.jda.portfolio.pos.client.process.eod.process.timeslip.TimeSlipExportProc
> ess.run(TimeSlipExportProcess.java:47)
>         at
> com.jda.portfolio.pos.client.action.backoffice.eod.EndOfDayProcessController
> $2.run(EndOfDayProcessController.java:143)
> Caused by: java.lang.ExceptionInInitializerError
>         at
> com.jda.portfolio.hostexport.base.xmlbean.TimeslipsDocument.<clinit>(Timesli
> psDocument.java:19)
>         at
> com.jda.portfolio.hostexport.base.xmlbean.TimeslipsDocument$Factory.newInsta
> nce(TimeslipsDocument.java:337)
>         at
> com.jda.portfolio.hostexport.server.exporthandler.timeslip.ExportTimeslipHan
> dler.startExport(ExportTimeslipHandler.java:48)
>         at
> com.jda.portfolio.hostexport.server.service.ExportHostSystemServiceBean.star
> tExport(ExportHostSystemServiceBean.java:90)
>         at
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_E
> OImpl.startExport(ExportHostSystemService_hxut8w_EOImpl.java:98)
>         at
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_E
> OImpl_WLSkel.invoke(Unknown Source)
>         at
> weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466)
>         at
> weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
> :108)
>         at
> weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409)
>         at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
> t.java:353)
>         at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
>         at
> weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404)
>         at
> weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
> 0)
>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> Caused by: java.lang.RuntimeException: Could not instantiate
> SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is
> the
> version of xbean.jar correct?
>         at
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.loadTypeSys
> tem(TypeSystemHolder.java:12)
>         at
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.<clinit>(Ty
> peSystemHolder.java:6)
>         ... 15 more
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
> sorImpl.java:39)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
> torAccessorImpl.java:27)
>         at
>         java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.loadTypeSys
> tem(TypeSystemHolder.java:10)
>         ... 16 more
> Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: XML-BEANS
> compiled
> schema: Could not locate compiled schema resource
> schema/system/sA2D1A7E239AD9DCB87A48FDC362C6133/index.xsb
> (schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.index) - code 0
>         at
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(Schema
> TypeSystemImpl.java:1110)
>         at
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(SchemaTy
> peSystemImpl.java:312)
>         at
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystem
> Impl.java:192)
>         ... 21 more
> 
>  

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Re: Problems with initialization (ExceptionInInitializerError)

Posted by Toby H Ferguson <to...@Sun.COM>.
A quick reply (i.e. not a lot of thought!) but it looks as if the class 
loader is not permitting the SchemaTypeLoader to get at its index.xsb 
(whatever that is!). I don't know if that's in some other location but 
I'd bet a pound (sterling) to a pinch of pig-shit (as we say in the UK) 
that its along those lines. See if you can (by hand) find the very thing 
its complaining about near the bottom of this trace - if you can then 
your problem is that you can find it, but the system can't: i.e. you've 
got to figure out where the system wants it to be so that your 
application can see it - try sticking it directly in with the app!

Toby H Ferguson

Lance Robertson wrote:

> Ok, thanks to the invaluable help on this list I've gotten my xmlbeans 
> stuff to deploy and am now working on actually building an object to 
> get it to save out the XML for us. I"ve got a server side EJB in which 
> I try the following line:
>  
> TimeslipsDocument  allTimeslipsDocument = 
> TimeslipsDocument.Factory.newInstance();
> When it hits this line everything blows to all bloody heck :) The 
> error I receive is below.  From looking through the error it's looking 
> like some problem with SchemaTypeSystemImpl. My xbean.jar is the same 
> file that I used for my rapid prototype and it works just fine there 
> (It's not "deployed" there just run) but the xbean.jar is should be 
> the same either way. Does anyone have a thought on what this might be? 
> I'd appreciate any pointers or help anyone could offer.
>  
>
> Lance
>  
>  
>  
> 796437 [eodProcesses] ERROR root  -
> java.rmi.RemoteException: EJB Exception: ; nested exception is:
>         java.lang.ExceptionInInitializerError
>         at 
> weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
>         at 
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
>         at 
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
>         at 
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_EOImpl_811_WLStub.startExport(Unknown 
> Source)
>         at 
> com.jda.portfolio.pos.client.process.eod.process.timeslip.TimeSlipExportProcess.run(TimeSlipExportProcess.java:47)
>         at 
> com.jda.portfolio.pos.client.action.backoffice.eod.EndOfDayProcessController$2.run(EndOfDayProcessController.java:143)
> Caused by: java.lang.ExceptionInInitializerError
>         at 
> com.jda.portfolio.hostexport.base.xmlbean.TimeslipsDocument.<clinit>(TimeslipsDocument.java:19)
>         at 
> com.jda.portfolio.hostexport.base.xmlbean.TimeslipsDocument$Factory.newInstance(TimeslipsDocument.java:337)
>         at 
> com.jda.portfolio.hostexport.server.exporthandler.timeslip.ExportTimeslipHandler.startExport(ExportTimeslipHandler.java:48)
>         at 
> com.jda.portfolio.hostexport.server.service.ExportHostSystemServiceBean.startExport(ExportHostSystemServiceBean.java:90)
>         at 
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_EOImpl.startExport(ExportHostSystemService_hxut8w_EOImpl.java:98)
>         at 
> com.jda.portfolio.hostexport.server.service.ExportHostSystemService_hxut8w_EOImpl_WLSkel.invoke(Unknown 
> Source)
>         at 
> weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466)
>         at 
> weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
>         at 
> weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409)
>         at 
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
>         at 
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
>         at 
> weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404)
>         at 
> weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> Caused by: java.lang.RuntimeException: Could not instantiate 
> SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is 
> the version of xbean.jar correct?
>         at 
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.loadTypeSystem(TypeSystemHolder.java:12)
>         at 
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.<clinit>(TypeSystemHolder.java:6)
>         ... 15 more
> Caused by: java.lang.reflect.InvocationTargetException
>         at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at 
> schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.TypeSystemHolder.loadTypeSystem(TypeSystemHolder.java:10)
>         ... 16 more
> Caused by: org.apache.xmlbeans.SchemaTypeLoaderException: XML-BEANS 
> compiled schema: Could not locate compiled schema resource 
> schema/system/sA2D1A7E239AD9DCB87A48FDC362C6133/index.xsb 
> (schema.system.sA2D1A7E239AD9DCB87A48FDC362C6133.index) - code 0
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl$XsbReader.<init>(SchemaTypeSystemImpl.java:1110)
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(SchemaTypeSystemImpl.java:312)
>         at 
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSystemImpl.java:192)
>         ... 21 more
>