axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert lazarski" <>
Subject Re: Cannot load SchemaTypeSystem
Date Thu, 20 Jul 2006 16:20:15 GMT
When you run WSDL2Java with xmlbeans, there will indeed be a
TypeSystemHolder class generated and you have to somehow get that
class into you classpath. From the codegen guide:

"An important detail is that an XMLBean class file is also generated
by WSDL2Java, TypeSystemHolder.class. That file is placed into
build/classes by the above ant task and will be needed to compile the
generated sources. A frequent problem is users get an error such as:

ClassNotFoundException : Cannot load SchemaTypeSystem. Unable to load
class with name
Make sure the generated binary files are on the classpath.

The TypeSystemHolder.class generated by WSDL2Java must be placed in
your classpath in order to avoid this error."

For example, when I run WSDL2Java, I do it thru an ant task:

<target name="wsdl2java" depends="clean,prepare">
      <delete dir="output" />
      <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
          <classpath refid="axis.classpath"/>
          <arg value="-d"/>
          <!-- none ??? -->
          <arg value="xmlbeans"/>
          <arg value="-uri"/>
          <arg file="wsdl/Maragato.wsdl"/>
          <arg value="-ss"/>
          <arg value="-ssi"/>
          <arg value="-g"/>
          <arg value="-sd"/>
          <arg value="-o"/>
          <arg file="output"/>
          <arg value="-p"/>
          <arg value=""/>

      <!-- Move the schema folder to classpath-->
      <move todir="${build.classes}">
          <fileset dir="output/resources">
              <include name="*schema*/**/*.class"/>
              <include name="*schema*/**/*.xsb"/>


In this case, I get:


I just confirmed that still works with todays svn.


On 7/19/06, Derek <> wrote:
> Hi, folks.
> I just ran WSDL2Java (from yesterday's nightly build), and generated a bunch
> of output files. Now, I am trying to test a client which is written with
> those output files. Whenever I try, however, I get the following exception:
> Exception in thread "main" java.lang.ExceptionInInitializerError
>         at
> 79)
>         at
> crc.importtestclient.IEEE1512Client.createIMWrapper(
>         at
> crc.importtestclient.IEEE1512Client.runTest(
>         at crc.importtestclient.ClientMain.main(
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(
> )
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>         at java.lang.reflect.Method.invoke(
>         at
> com.intellij.rt.execution.application.AppMain.main(
> Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable
> to load class with name
> schemaorg_apache_xmlbeans.system.s3F178E0A50CC587BC745803A994CE78D.TypeSyste
> mHolder. Make sure the generated binary files are on the classpath.
>         at
> org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(
>         at
>         ... 9 more
> Caused by: java.lang.ClassNotFoundException:
> schemaorg_apache_xmlbeans.system.s3F178E0A50CC587BC745803A994CE78D.TypeSyste
> mHolder
>         at$
>         at Method)
>         at
>         at java.lang.ClassLoader.loadClass(
>         at sun.misc.Launcher$AppClassLoader.loadClass(
>         at java.lang.ClassLoader.loadClass(
>         at
> org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(
>         ... 10 more
> I have verified that the generated 'resources' directory is in my classpath.
> I have also verified that there exists a subdirectory of it named
> schemaorg_apache_xmlbeans/system/s3F178E0A50CC587BC745803A994CE78D. However,
> there is no TypeSystemHolder class in that directory (although there are a
> bunch of .xsb files in it).
> I am rather flummoxed as to what to do. Has anybody seen this before?
> Derek
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message