I'm trying to create a maven project for the quickstartxmlbeans example.
If I build it using the axis2-wsdl2code-maven-plugin I get the error
below.  If I build it using the ant build.xml file which is generated it
works fine.  This is on xp machine.  It seemed to work fine on Osx.  I
used ant within the pom build file instead of
axis2-wsdl2code-maven-plugin and it worked fine.  Any ideas where to
look next?

 

Caused by: java.lang.RuntimeException: Could not instantiate
SchemaTypeSystemImpl (java.lang.reflect.InvocationTargetException): is
the version of xbean.jar correct?

        at
schemaorg_apache_xmlbeans.system.sCA62E59A9FA1AB04F2C0D6123E3944E8.TypeS
ystemHolder.loadTypeSystem(Unknown Source)

        at
schemaorg_apache_xmlbeans.system.sCA62E59A9FA1AB04F2C0D6123E3944E8.TypeS
ystemHolder.<clinit>(Unknown Source)

        ... 30 more

Caused by: java.lang.reflect.InvocationTargetException

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:39)

        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:27)

        at
java.lang.reflect.Constructor.newInstance(Constructor.java:501)

        ... 32 more

Caused by: java.lang.ClassCastException:
org.apache.xmlbeans.SchemaGlobalElement$Ref

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.buildContainers(Sch
emaTypeSystemImpl.java:690)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.initFromHeader(Sche
maTypeSystemImpl.java:322)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl.<init>(SchemaTypeSy
stemImpl.java:185)

        ... 36 more

 

And my configuration

<groupId>org.apache.axis2</groupId>

                <artifactId>axis2-wsdl2code-maven-plugin</artifactId>

                <version>${axis2.version}</version>

                <configuration>

 
<packageName>samples.quickstart.service.xmlbeans</packageName>

                    <generateServerSide>true</generateServerSide>

 
<generateServerSideInterface>true</generateServerSideInterface>

                    <databindingName>xmlbeans</databindingName>

                    <generateServicesXml>false</generateServicesXml>

                    <outputDirectory>src/main/</outputDirectory>

 
<wsdlFile>${basedir}/src/main/resources/META-INF/StockQuoteService.wsdl<
/wsdlFile>

                    <namespaceToPackages>

 
http://quickstart.samples/xsd=samples.quickstart.service.xmlbeans.xsd

                    </namespaceToPackages>

 
<targetSourceFolderLocation>java/</targetSourceFolderLocation>

 
<targetResourcesFolderLocation>resources/</targetResourcesFolderLocation
>

                </configuration>

Reply via email to