wsdl2Java fails from Headless Ant
We are working in RAD (7.0.0.x) for development to Websphere 6.1. In our ant script we have the following:
<!-- *************************************************** -->
<!-- ** Generate WebService Client classes -->
<!-- *************************************************** -->
<target name="-generate-classes" if="ejbmodulesrcdir.exists">
<wsdl2java url="${ejbmodule.src.dir}/META-INF/wsdl/TransportationWebService.wsdl" output="${java.genSrc.dir}" role="client" container="none" introspect="false" genjava="true" verbose="true" />
<echo>Transportation WS Client classes generated successfully</ech开发者_如何学Pythono>
</target>
When the target is executed inside the RAD environment there are not issues. But, when we run as a Headless ant script, we then see the following error:
HeadlessWorkspaceSettings: INITIAL autoBuild=true maxFile=1048576
HeadlessWorkspaceSettings: TEMP autoBuild=false maxFile=-1
Buildfile: buildWebServiceClientClasses.xml
genTransportationWSClientClasses:
[wsdl2java] java.lang.ExceptionInInitializerError
[wsdl2java] at java.lang.J9VMInternals.initialize(J9VMInternals.java:218)
[wsdl2java] at sun.misc.Unsafe.ensureClassInitialized(Native Method)
[wsdl2java] at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
[wsdl2java] at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:150)
[wsdl2java] at java.lang.reflect.Field.acquireFieldAccessor(Field.java:962)
[wsdl2java] at java.lang.reflect.Field.getFieldAccessor(Field.java:929)
[wsdl2java] at java.lang.reflect.Field.get(Field.java:388)
[wsdl2java] at org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescriptor.getEPackage(RegistryReader.java:168)
[wsdl2java] at org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage(EPackageRegistryImpl.java:112)
[wsdl2java] at com.ibm.ejs.models.base.extensions.transappclientext.impl.TransactionAppClientExtPackageImpl.init
There are more lines was not sure if I should post them all here.
Have done searches but have not been able to locate anything. Any directions - see anything wrong?
Thyanks
Is the headless build box's version of Java lower than the version you are using on your own box?
Are all the required Jars on the headless build box?
Maybe it would be better to not automate the Wsdl2Java stage of the process, but to do that manually and store the resulting source code in revision control instead?
My guess is that its related to classpath issues on the build box. See also: http://www.mail-archive.com/user-java@ibatis.apache.org/msg12634.html
精彩评论