• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Make sure the generated binary files are on the classpath

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic