You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by craig wickesser <co...@gmail.com> on 2007/04/25 06:13:36 UTC

Error: Cannot load SchemaTypeSystem

Hi,
   I am using Axis2 to access a web service, and I generated the Java code
from a WSDL.  Works great  So I created a simple Test class which looks
like:

class Test {
    public static void main(String[] args) {

        FooBarServiceStub stub = new FooBarServiceStub();

        SayHelloDocument reqDoc = SayHelloDocument.Factory.newInstance();
        .
        .
        .

    }
}

When I run this I get an error (at the lin where it creates a newInstance of
SayHelloDocument):


Exception in thread "main" java.lang.ExceptionInInitializerError

at blah.SayHelloDocument$Factory.newInstance(*SayHelloDocument.java:132*)

at blah.Test.main(*Test.java:25*)

Caused by: *java.lang.RuntimeException*: Cannot load SchemaTypeSystem.
Unable to load class with name
schemaorg_apache_xmlbeans.system.sCBF8B98FA2E75865F9C83C43E1056B1A.TypeSystemHolder.
Make sure the generated binary files are on the classpath.

I have located the TypeSystemHolder.class that it references but no matter
what I try (i.e. adding it to the classpath, unless I am doing that wrong) I
continue to get the error.  Can someone help?

I try to run this Test class from Eclipse, so I can set the "Classpath" via
the "Run" menu.

Re: Error: Cannot load SchemaTypeSystem

Posted by Philipp Leitner <ph...@gmx.at>.
You are not missing SchemaTypeSystem, but rather 
schemaorg_apache_xmlbeans.system.sCBF8B98FA2E75865F9C83C43E1056B1A.TypeSystemHolder 
. This is a file that gets generated by XMLBeans when it compiles XML 
Schemata. You have to add all class files in the directory 
"schemaorg_apache_xmlbeans" (they get generated when running wsdl2java) 
to the run path.

/philipp

craig wickesser schrieb:
> Hi,
>    I am using Axis2 to access a web service, and I generated the Java 
> code from a WSDL.  Works great  So I created a simple Test class which 
> looks like:
>  
> class Test {
>     public static void main(String[] args) {
>  
>         FooBarServiceStub stub = new FooBarServiceStub();
>        
>         SayHelloDocument reqDoc = SayHelloDocument.Factory.newInstance();
>         .
>         .
>         .
>  
>     }
> }
>  
> When I run this I get an error (at the lin where it creates a 
> newInstance of SayHelloDocument):
>  
> 
> Exception in thread "main" java.lang.ExceptionInInitializerError
> 
> at blah.SayHelloDocument$Factory.newInstance(
> 
> _SayHelloDocument.java:132_)
> 
> at blah.Test.main(
> 
> _Test.java:25_)
> 
> Caused by:
> 
> _java.lang.RuntimeException_: Cannot load SchemaTypeSystem. Unable to 
> load class with name 
> schemaorg_apache_xmlbeans.system.sCBF8B98FA2E75865F9C83C43E1056B1A.TypeSystemHolder. 
> Make sure the generated binary files are on the classpath.
> 
> I have located the TypeSystemHolder.class that it references but no 
> matter what I try (i.e. adding it to the classpath, unless I am doing 
> that wrong) I continue to get the error.  Can someone help?
> 
> I try to run this Test class from Eclipse, so I can set the "Classpath" 
> via the "Run" menu.
> 
>  
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org