| Author |
Make sure the generated binary files are on the classpath
|
badri nath
Ranch Hand
Joined: Dec 21, 2005
Posts: 57
|
|
Hi All, I am trying to run my client class as stand alone without using ant build file. i have generated java files from WSDL using Axis2. now i want to pass input parameters to the stub class automatically generated and hence trying to pass using client. i am able to do that and even run my application using ant build file. but i want to run my client class as standalone and when i am tryin to do that i am getting the following error. Exception in thread "main" java.lang.ExceptionInInitializerError at com.myride.integrate.buy.leadengine.stub.PingDocument$Factory.newInstance(PingDocument.java:232) at com.myride.integrate.buy.leadengine.LeadEngineInterfaceImpl.getDealers(LeadEngineInterfaceImpl.java:86) at com.myride.integrate.buy.leadengine.LeadEngineInterfaceImpl.main(LeadEngineInterfaceImpl.java:458) Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s8C7290608CCAC7E87DA4C38A437F9B5C.TypeSystemHolder. Make sure the generated binary files are on the classpath. at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783) at com.myride.integrate.buy.leadengine.stub.PingDocument.<clinit>(PingDocument.java:20) ... 3 more Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.s8C7290608CCAC7E87DA4C38A437F9B5C.TypeSystemHolder at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769) ... 4 more I tried to add generated .xsb files into my jar file and place it in class path but of no use. Kindly suggest some way out.
|
 |
ujwwala tem
Ranch Hand
Joined: Feb 10, 2010
Posts: 68
|
|
Hi,
Can you please tell how you have solved the problem,
oying module: metadataExchange - file:/C:/axis2_SDK/lib/mex-1.4.1.jar
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.example.www.xsd.AddNumbersDocument$Factory.newInstance(AddNumbersDocument.java:45)
at org.example.www.client.addNumbers(client.java:33)
at org.example.www.client.main(client.java:21)
Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s7CDCA0E99B6F193510B1D0DA962B6B5E.TypeSystemHolder. Make sure the generated binary files are on the classpath.
at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783)
at org.example.www.xsd.AddNumbersDocument.<clinit>(AddNumbersDocument.java:20)
... 3 more
Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.s7CDCA0E99B6F193510B1D0DA962B6B5E.TypeSystemHolder
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:769)
... 4 more
I have put the typesystemhandler.class as a jar in classpath,I am trying to create stubs and skeletons using xmlbeans+axis2
Please Reply,
|
 |
line six
Greenhorn
Joined: Dec 06, 2011
Posts: 1
|
|
Ok, im gonna put this up in case I forgot. Or in case anybody needs this thing.
What I did to fix this problem was:
1. run the WSDL2JAVA . this will create various files, including an ant build script
2. run the ant script: ant jar.client
3. it will create a jar and just put the jar on your classpath.
4. the error should go away
|
 |
 |
|
|
subject: Make sure the generated binary files are on the classpath
|
|
|