wsdl2Java 从 Headless Ant 失败
我们正在 RAD (7.0.0.x) 中开发 Websphere 6.1。在我们的 ant 脚本中,我们有以下内容:
<!-- *************************************************** -->
<!-- ** 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</echo>
</target>
当目标在 RAD 环境中执行时,不会出现问题。但是,当我们作为无头蚂蚁脚本运行时,我们会看到以下错误:
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
还有更多行不确定我是否应该将它们全部发布到此处。
已进行搜索但未能找到任何内容。任何指示 - 看到什么问题吗?
蒂扬克斯
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</echo>
</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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
无头构建盒的 Java 版本是否低于您在自己的构建盒上使用的版本?
无头成型箱上是否有所有必需的罐子?
也许最好不要自动化该过程的 Wsdl2Java 阶段,而是手动执行此操作并将生成的源代码存储在修订控制中?
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?
我的猜测是,它与构建箱上的类路径问题有关。另请参阅:http://www.mail-archive .com/[电子邮件受保护]/msg12634.html
My guess is that its related to classpath issues on the build box. See also: http://www.mail-archive.com/[email protected]/msg12634.html