RE: Cannot load SchemaTypeSystem
Ouuh sorry I missed that single .class file... but anyway, if all of the xsb stuff is on the runtime class path (i. e. the directories containing it all) this is OK. I preferred to pack this all together as a JAR and add it to the JAR zoo of the application. But that problem solved, now the constructors. The generated XyzStub class is the user-friendly frontend of all generated stuff. For standard scenarios this will do, and it has some additional constructors allowing you to add additional configuration besides the endpoint. I think this is merely a guess what may be needed in usual scenarios -- but in the simplest cases, you should be done simply using the constructor taking the endpoint only. In my case I needed additional configuration, and that forced me to use a neighbour class of XyzStub -- Xyz. This class provides some additional functionality to set up Options. I needed this to prevent the generated code to use chunked transfer, which usually is allowed to use, but was not in ma case. Not that helpful maybe, but the existing constructors should work if provided with useful non-null arguments. (but whats useful at the end...) hth, --cg -Original Message- From: sch...@afrigis.co.za [mailto:sch...@afrigis.co.za] Sent: Friday, October 09, 2009 7:31 AM To: axis-user@ws.apache.org; fryar...@gmail.com Subject: RE: Cannot load SchemaTypeSystem Awesome Michael, That did the job, in my case I had to copy it to the build directory as it is a web app but it worked perfectly. Now though I encountered a lovely surprise, a NullPointerException thrown by one of the generated stubs, specifically this line: _messageContext.getTransportOut().getSender().cleanup(_messageContext); I will add some log statements in here but I am guessing it is _messageContext. I now the stub had various constructors and for some of these if you only provide the end point it sets the other, which I believe is this _messageContext to null, not sure why those constructors exist then if you should not really be using them, or am I missing something? -- Kind Regards Schalk Neethling -Original Message- From: FRYARS, Michael [mailto:fryar...@gmail.com] Sent: 08 October 2009 10:06 PM To: axis-user@ws.apache.org Subject: Re: Cannot load SchemaTypeSystem In among all those .xsb files you'll find a single .class file, and this .class must be available at runtime. [Note: XMLBeans generates the .class directly, it doesn't generate a .java and then have it compiled] I saw the problem you describe when running JUnit tests which used an axis2-generated SOAP client. The AAR deployed in the axis2 WAR was fine. But the (eclipse) project that held the tests didn't have this XMLBeans .class file in the 'bin' directory. It was present in the 'resource' directory, which was the target directory for XMLBeans generated source, but it wasn't copied to the bin directory and so wasn't available to the test client at runtime. Simply copying it across to the bin directory solved the problem. Regards, Michael sch...@afrigis.co.za a écrit : Hi there Christian, I did find the resource folder with stacks of .xsb files on. I added this to the sources in the build path in Eclipse as well as to the Output... tab. However, I still get the problem, any ideas as to where else I need to set something? Maybe something to do with Tomcat? Thanks for your help. -- Kind Regards Schalk Neethling -Original Message- From: Christian Gosch [mailto:christian.go...@inovex.de] Sent: 08 October 2009 02:13 PM To: axis-user Subject: RE: Cannot load SchemaTypeSystem XMLbeans does not only generate classes, but lots of additional binaries, which must be presesnt on the classpath. Look through your output folder, and you will find an additional folder with this stuff. Add it to your runtime classpath, and you may be done :-) --cg -Original Message- From: sch...@afrigis.co.za [mailto:sch...@afrigis.co.za] Sent: Thursday, October 08, 2009 12:29 PM To: axis-user@ws.apache.org Subject: Cannot load SchemaTypeSystem Hi there, I finally got Axis2 to generate the appropriate stubs etc for me, finally having to use the command line tool, and I chose XMLBeans as my data binding solution as I have worked with it before and found it real easy to use. After having to hunt around for some jar files I can finally run a servlet to test out the generated code. I start of the servlet with the following: GetPointsByRadiusDocumentImpl pointsByRadius = new GetPointsByRadiusDocumentImpl(GetPointsByRadiusDocument.type); However, when running the servlet I get the exception mentioned above i.e. java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name
RE: Cannot load SchemaTypeSystem
General observation on NPE. Might apply to your case, Shalk, or it might not. I sometimes found NPEs in the execution of generated code when I wasn't careful to exactly match the axis2 version used for generation with the version used at runtime. (missing/renamed member variables, missing/renamed methods, etc) Regards, Michael Christian Gosch-2 wrote: Ouuh sorry I missed that single .class file... but anyway, if all of the xsb stuff is on the runtime class path (i. e. the directories containing it all) this is OK. I preferred to pack this all together as a JAR and add it to the JAR zoo of the application. But that problem solved, now the constructors. The generated XyzStub class is the user-friendly frontend of all generated stuff. For standard scenarios this will do, and it has some additional constructors allowing you to add additional configuration besides the endpoint. I think this is merely a guess what may be needed in usual scenarios -- but in the simplest cases, you should be done simply using the constructor taking the endpoint only. In my case I needed additional configuration, and that forced me to use a neighbour class of XyzStub -- Xyz. This class provides some additional functionality to set up Options. I needed this to prevent the generated code to use chunked transfer, which usually is allowed to use, but was not in ma case. Not that helpful maybe, but the existing constructors should work if provided with useful non-null arguments. (but whats useful at the end...) hth, --cg -Original Message- From: sch...@afrigis.co.za [mailto:sch...@afrigis.co.za] Sent: Friday, October 09, 2009 7:31 AM To: axis-user@ws.apache.org; fryar...@gmail.com Subject: RE: Cannot load SchemaTypeSystem Awesome Michael, That did the job, in my case I had to copy it to the build directory as it is a web app but it worked perfectly. Now though I encountered a lovely surprise, a NullPointerException thrown by one of the generated stubs, specifically this line: _messageContext.getTransportOut().getSender().cleanup(_messageContext); I will add some log statements in here but I am guessing it is _messageContext. I now the stub had various constructors and for some of these if you only provide the end point it sets the other, which I believe is this _messageContext to null, not sure why those constructors exist then if you should not really be using them, or am I missing something? -- Kind Regards Schalk Neethling -- View this message in context: http://www.nabble.com/Cannot-load-SchemaTypeSystem-tp25801609p25819161.html Sent from the Axis - User mailing list archive at Nabble.com.
RE: Cannot load SchemaTypeSystem
XMLbeans does not only generate classes, but lots of additional binaries, which must be presesnt on the classpath. Look through your output folder, and you will find an additional folder with this stuff. Add it to your runtime classpath, and you may be done :-) --cg -Original Message- From: sch...@afrigis.co.za [mailto:sch...@afrigis.co.za] Sent: Thursday, October 08, 2009 12:29 PM To: axis-user@ws.apache.org Subject: Cannot load SchemaTypeSystem Hi there, I finally got Axis2 to generate the appropriate stubs etc for me, finally having to use the command line tool, and I chose XMLBeans as my data binding solution as I have worked with it before and found it real easy to use. After having to hunt around for some jar files I can finally run a servlet to test out the generated code. I start of the servlet with the following: GetPointsByRadiusDocumentImpl pointsByRadius = new GetPointsByRadiusDocumentImpl(GetPointsByRadiusDocument.type); However, when running the servlet I get the exception mentioned above i.e. java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.sEFB7B44E94FC7E3BBFB970E23CA0512F.TypeS ys te mHolder. Make sure the generated binary files are on the classpath. Any help will be much appreciated. Thanks! Schalk AfriGIS e-mail facility may not be used for the distribution of chain letters or offensive email. AfriGIS hereby distances itself from and accepts no liability for the unauthorized use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. AfriGIS furthermore disclaims liability for any unauthorized instruction for which permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607. !DSPAM:4acdbf1b326661199011006!
RE: Cannot load SchemaTypeSystem
Hi there Christian, I did find the resource folder with stacks of .xsb files on. I added this to the sources in the build path in Eclipse as well as to the Output... tab. However, I still get the problem, any ideas as to where else I need to set something? Maybe something to do with Tomcat? Thanks for your help. -- Kind Regards Schalk Neethling -Original Message- From: Christian Gosch [mailto:christian.go...@inovex.de] Sent: 08 October 2009 02:13 PM To: axis-user Subject: RE: Cannot load SchemaTypeSystem XMLbeans does not only generate classes, but lots of additional binaries, which must be presesnt on the classpath. Look through your output folder, and you will find an additional folder with this stuff. Add it to your runtime classpath, and you may be done :-) --cg -Original Message- From: sch...@afrigis.co.za [mailto:sch...@afrigis.co.za] Sent: Thursday, October 08, 2009 12:29 PM To: axis-user@ws.apache.org Subject: Cannot load SchemaTypeSystem Hi there, I finally got Axis2 to generate the appropriate stubs etc for me, finally having to use the command line tool, and I chose XMLBeans as my data binding solution as I have worked with it before and found it real easy to use. After having to hunt around for some jar files I can finally run a servlet to test out the generated code. I start of the servlet with the following: GetPointsByRadiusDocumentImpl pointsByRadius = new GetPointsByRadiusDocumentImpl(GetPointsByRadiusDocument.type); However, when running the servlet I get the exception mentioned above i.e. java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.sEFB7B44E94FC7E3BBFB970E23CA0512F.TypeS ys te mHolder. Make sure the generated binary files are on the classpath. Any help will be much appreciated. Thanks! Schalk AfriGIS e-mail facility may not be used for the distribution of chain letters or offensive email. AfriGIS hereby distances itself from and accepts no liability for the unauthorized use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. AfriGIS furthermore disclaims liability for any unauthorized instruction for which permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607. !DSPAM:4acdbf1b326661199011006! AfriGIS e-mail facility may not be used for the distribution of chain letters or offensive email. AfriGIS hereby distances itself from and accepts no liability for the unauthorized use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. AfriGIS furthermore disclaims liability for any unauthorized instruction for which permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607. AfriGIS e-mail facility may not be used for the distribution of chain letters or offensive email. AfriGIS hereby distances itself from and accepts no liability for the unauthorized use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. AfriGIS furthermore disclaims liability for any unauthorized instruction for which permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607.
Re: Cannot load SchemaTypeSystem
In among all those .xsb files you'll find a single .class file, and this .class must be available at runtime. [Note: XMLBeans generates the .class directly, it doesn't generate a .java and then have it compiled] I saw the problem you describe when running JUnit tests which used an axis2-generated SOAP client. The AAR deployed in the axis2 WAR was fine. But the (eclipse) project that held the tests didn't have this XMLBeans .class file in the 'bin' directory. It was present in the 'resource' directory, which was the target directory for XMLBeans generated source, but it wasn't copied to the bin directory and so wasn't available to the test client at runtime. Simply copying it across to the bin directory solved the problem. Regards, Michael sch...@afrigis.co.za a écrit : Hi there Christian, I did find the resource folder with stacks of .xsb files on. I added this to the sources in the build path in Eclipse as well as to the Output... tab. However, I still get the problem, any ideas as to where else I need to set something? Maybe something to do with Tomcat? Thanks for your help. -- Kind Regards Schalk Neethling -Original Message- From: Christian Gosch [mailto:christian.go...@inovex.de] Sent: 08 October 2009 02:13 PM To: axis-user Subject: RE: Cannot load SchemaTypeSystem XMLbeans does not only generate classes, but lots of additional binaries, which must be presesnt on the classpath. Look through your output folder, and you will find an additional folder with this stuff. Add it to your runtime classpath, and you may be done :-) --cg -Original Message- From: sch...@afrigis.co.za [mailto:sch...@afrigis.co.za] Sent: Thursday, October 08, 2009 12:29 PM To: axis-user@ws.apache.org Subject: Cannot load SchemaTypeSystem Hi there, I finally got Axis2 to generate the appropriate stubs etc for me, finally having to use the command line tool, and I chose XMLBeans as my data binding solution as I have worked with it before and found it real easy to use. After having to hunt around for some jar files I can finally run a servlet to test out the generated code. I start of the servlet with the following: GetPointsByRadiusDocumentImpl pointsByRadius = new GetPointsByRadiusDocumentImpl(GetPointsByRadiusDocument.type); However, when running the servlet I get the exception mentioned above i.e. java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.sEFB7B44E94FC7E3BBFB970E23CA0512F.TypeS ys te mHolder. Make sure the generated binary files are on the classpath. Any help will be much appreciated. Thanks! Schalk AfriGIS e-mail facility may not be used for the distribution of chain letters or offensive email. AfriGIS hereby distances itself from and accepts no liability for the unauthorized use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. AfriGIS furthermore disclaims liability for any unauthorized instruction for which permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607. !DSPAM:4acdbf1b326661199011006! AfriGIS e-mail facility may not be used for the distribution of chain letters or offensive email. AfriGIS hereby distances itself from and accepts no liability for the unauthorized use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. AfriGIS furthermore disclaims liability for any unauthorized instruction for which permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607. AfriGIS e-mail facility may not be used for the distribution of chain letters or offensive email. AfriGIS hereby distances itself from and accepts no liability for the unauthorized use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. AfriGIS furthermore disclaims liability for any unauthorized instruction for which permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607.
RE: Cannot load SchemaTypeSystem
Awesome Michael, That did the job, in my case I had to copy it to the build directory as it is a web app but it worked perfectly. Now though I encountered a lovely surprise, a NullPointerException thrown by one of the generated stubs, specifically this line: _messageContext.getTransportOut().getSender().cleanup(_messageContext); I will add some log statements in here but I am guessing it is _messageContext. I now the stub had various constructors and for some of these if you only provide the end point it sets the other, which I believe is this _messageContext to null, not sure why those constructors exist then if you should not really be using them, or am I missing something? -- Kind Regards Schalk Neethling -Original Message- From: FRYARS, Michael [mailto:fryar...@gmail.com] Sent: 08 October 2009 10:06 PM To: axis-user@ws.apache.org Subject: Re: Cannot load SchemaTypeSystem In among all those .xsb files you'll find a single .class file, and this .class must be available at runtime. [Note: XMLBeans generates the .class directly, it doesn't generate a .java and then have it compiled] I saw the problem you describe when running JUnit tests which used an axis2-generated SOAP client. The AAR deployed in the axis2 WAR was fine. But the (eclipse) project that held the tests didn't have this XMLBeans .class file in the 'bin' directory. It was present in the 'resource' directory, which was the target directory for XMLBeans generated source, but it wasn't copied to the bin directory and so wasn't available to the test client at runtime. Simply copying it across to the bin directory solved the problem. Regards, Michael sch...@afrigis.co.za a écrit : Hi there Christian, I did find the resource folder with stacks of .xsb files on. I added this to the sources in the build path in Eclipse as well as to the Output... tab. However, I still get the problem, any ideas as to where else I need to set something? Maybe something to do with Tomcat? Thanks for your help. -- Kind Regards Schalk Neethling -Original Message- From: Christian Gosch [mailto:christian.go...@inovex.de] Sent: 08 October 2009 02:13 PM To: axis-user Subject: RE: Cannot load SchemaTypeSystem XMLbeans does not only generate classes, but lots of additional binaries, which must be presesnt on the classpath. Look through your output folder, and you will find an additional folder with this stuff. Add it to your runtime classpath, and you may be done :-) --cg -Original Message- From: sch...@afrigis.co.za [mailto:sch...@afrigis.co.za] Sent: Thursday, October 08, 2009 12:29 PM To: axis-user@ws.apache.org Subject: Cannot load SchemaTypeSystem Hi there, I finally got Axis2 to generate the appropriate stubs etc for me, finally having to use the command line tool, and I chose XMLBeans as my data binding solution as I have worked with it before and found it real easy to use. After having to hunt around for some jar files I can finally run a servlet to test out the generated code. I start of the servlet with the following: GetPointsByRadiusDocumentImpl pointsByRadius = new GetPointsByRadiusDocumentImpl(GetPointsByRadiusDocument.type); However, when running the servlet I get the exception mentioned above i.e. java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.sEFB7B44E94FC7E3BBFB970E23CA0512F.TypeS ys te mHolder. Make sure the generated binary files are on the classpath. Any help will be much appreciated. Thanks! Schalk AfriGIS e-mail facility may not be used for the distribution of chain letters or offensive email. AfriGIS hereby distances itself from and accepts no liability for the unauthorized use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. AfriGIS furthermore disclaims liability for any unauthorized instruction for which permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607. !DSPAM:4acdbf1b326661199011006! AfriGIS e-mail facility may not be used for the distribution of chain letters or offensive email. AfriGIS hereby distances itself from and accepts no liability for the unauthorized use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. AfriGIS furthermore disclaims liability for any unauthorized instruction for which permission was not granted. Required as per Sec 50 Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607. AfriGIS e-mail facility may not be used for the distribution of chain letters or offensive email. AfriGIS hereby distances itself from and accepts no liability for the unauthorized use of its e-mail facility or the sending of e-mail communications for other than
Re: Cannot load SchemaTypeSystem Error in Axis2 client using XMLBeans
This is a common problem. I think you can run one of the bat / sh files that get generated, or you can follow these instructions: http://ws.apache.org/axis2/tools/1_2/CodegenToolReference.html#invoking 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 schemaorg_apache_xmlbeans.system.s68C41DB812F52C975439BA10FE4FEE54.TypeSystemHolder. 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. HTH, Robert On 5/21/07, Ashish Kulkarni [EMAIL PROTECTED] wrote: Hi I am using WSDL2Java to create java source from WSDL, and then i created a client to call this web service, but i am getting following error Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.sC3DD632CC9C08A8478E13FA275B1520E.TypeSystemHolder. Make sure the generated binary files are on the classpath. at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java :783) at com.pfizer.www.bod.mapslims.req.SyncPurchaseItemInDocument$SyncPurchaseItemIn .clinit(SyncPurchaseItemInDocument.java:45) ... 3 more Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.sC3DD632CC9C08A8478E13FA275B1520E.TypeSystemHolder I have these lot of XSD files, what am i missing Ashish
Re: Cannot load SchemaTypeSystem
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: http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html 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 schemaorg_apache_xmlbeans.system.s68C41DB812F52C975439BA10FE4FEE54.TypeSystemHolder. 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=br.com.atlantico.maragato.webservices.endpoint/ /java !-- Move the schema folder to classpath-- move todir=${build.classes} fileset dir=output/resources include name=*schema*/**/*.class/ include name=*schema*/**/*.xsb/ /fileset /move /target In this case, I get: build/classes/schemaorg_apache_xmlbeans/system/sC4DADC577FF83F46C2C248EE4254F70D/TypeSystemHolder.class I just confirmed that still works with todays svn. HTH, Robert http://www.braziloutsource.com/ On 7/19/06, Derek [EMAIL PROTECTED] 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 crc.ieee1512import.xmlbeans.im.IMWrapper$Factory.newInstance(IMWrapper.java: 79) at crc.importtestclient.IEEE1512Client.createIMWrapper(IEEE1512Client.java:67) at crc.importtestclient.IEEE1512Client.runTest(IEEE1512Client.java:50) at crc.importtestclient.ClientMain.main(ClientMain.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) 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(XmlBeans.java:781) at crc.ieee1512import.xmlbeans.im.IMWrapper.clinit(IMWrapper.java:18) ... 9 more Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.s3F178E0A50CC587BC745803A994CE78D.TypeSyste mHolder 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:767) ... 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot load SchemaTypeSystem
Thanks for your response, Robert. I did some more looking, and found that my IDE (IntelliJ Idea) was hiding the class file that was generated from me, so I didn't know it existed. I also found that the specific run target that I was using wasn't including the resources directory in the class path like I thought it was. I had set up Idea to include the directory in the source path for compilation, not the class path, assuming that what was going to be generated was Java source code rather than a class file. I am still a bit surprised that an actual class file is being generated here, particularly after looking at the code in WSDL2Java which does it by copying and modifying an existing class file (!). With the directory now properly included in my runtime class path, the code now seems to run correctly. Derek -Original Message- From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Thursday, July 20, 2006 9:20 AM To: axis-user@ws.apache.org; [EMAIL PROTECTED] Subject: Re: Cannot load SchemaTypeSystem 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: http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html 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 schemaorg_apache_xmlbeans.system.s68C41DB812F52C975439BA10FE4F EE54.TypeSystemHolder. 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=br.com.atlantico.maragato.webservices.endpoint/ /java !-- Move the schema folder to classpath-- move todir=${build.classes} fileset dir=output/resources include name=*schema*/**/*.class/ include name=*schema*/**/*.xsb/ /fileset /move /target In this case, I get: build/classes/schemaorg_apache_xmlbeans/system/sC4DADC577FF83F 46C2C248EE4254F70D/TypeSystemHolder.class I just confirmed that still works with todays svn. HTH, Robert http://www.braziloutsource.com/ On 7/19/06, Derek [EMAIL PROTECTED] 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 crc.ieee1512import.xmlbeans.im.IMWrapper$Factory.newInstance(IMWrapper .java: 79) at crc.importtestclient.IEEE1512Client.createIMWrapper(IEEE1512Cl ient.java:67) at crc.importtestclient.IEEE1512Client.runTest(IEEE1512Client.java:50) at crc.importtestclient.ClientMain.main(ClientMain.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess orImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth odAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system.s3F178E0A50CC587BC745803A994C E78D.TypeSyste mHolder. Make sure the generated binary files are on the classpath. at org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans .java:781) at crc.ieee1512import.xmlbeans.im.IMWrapper.clinit(IMWrapper.java:18) ... 9 more Caused by: java.lang.ClassNotFoundException: schemaorg_apache_xmlbeans.system.s3F178E0A50CC587BC745803A994C E78D.TypeSyste mHolder at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method