Error using Ant to create EJB after upgrading WAS from 6.0 to 7.0

烈酒焚心 提交于 2019-12-12 02:15:24

问题


Ant task breaks at the <wsejbdeploy> tag. The exception message is :

[wsejbdeploy] Error executing deployment: java.lang.ClassNotFoundException. 
Error is com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.
[wsejbdeploy] java.lang.ClassNotFoundException: 
com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension
[wsejbdeploy]   at java.lang.Class.forName(Class.java:136)

In addition to that, ivy.xml reports problems, but when I inspect it, the messages have no sense (screenshot). I suspect the problems could be:

a) Additional files that I have for the build which conflict with the upgraded Ant (in RSA 7.0 i've had Ant 1.6.5 and RSA 8.0 comes with Ant 1.7.1). Additional files are:

required for ant tasks execution

  • ant-contrib/ant-contrib.jar
  • antelope-tasks/AntelopeTasks_3.2.10.jar
  • antform/antform.jar
  • antform/defaultStyle.txt
  • antlr/antlr.jar
  • checkstyle/checkstyle-4.2.jar
  • checkstyle/checkstyle-optional-4.2.jar
  • checkstyle/checkstyle-frames-errors.xsl
  • clover/clover.jar
  • clover/cenquatasks.jar
  • clover/clover.license
  • doccheck/doccheck-modified.jar
  • ivy/ivy-20060723172807.jar
  • jakarta-commons/commons-beanutils.jar
  • resources/checkstyle/checks-source.xml
  • resources/checkstyle/checksTransformation.xsl

b) Changes in the Ant regarding EJB build which require some settings to be reconfigured.

c) Something else :)

Except the Error, everything else is a stab in the dark so feel free to ask for any additional info.


回答1:


The problem was in the additional file needed for wsejbdeploy. In the 6.0 version, you copy wsanttasks.jar and wsprofile.jar from the websphere 6.0 installation folder and then reference it like this

<taskdef name="wsejbdeploy" classname="com.ibm.websphere.ant.tasks.WsEjbDeploy"
       classpathref="all-libs"/>

where "all-libs" is a reference to the folder where you copied the jars. In websphere 7.0 there is no wsanttasks.jar and you must reference the runtime file, eg

<taskdef name="wsejbdeploy" classname="com.ibm.websphere.ant.tasks.WsEjbDeploy">
<classpath> 
<pathelement path="C:/IBM/SDP80/runtimes/base_v7/plugins/com.ibm.ws.runtime.jar" /> 
</classpath> 



来源:https://stackoverflow.com/questions/5962016/error-using-ant-to-create-ejb-after-upgrading-was-from-6-0-to-7-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!