用于生成 webservice war 文件的 Weblogic Ant JWSC 任务
我正在运行 jwsc ant 任务来生成 war 文件。如果我在运行 ant 脚本之前将 weblogic.jar 添加到类路径(CLASSPATH=/opt/bea/weblogic91/server/lib/weblogic.jar export CLASSPATH),
那么它对我来说工作正常,但是如果我将其添加到中,则它不起作用我的 build.xml 如下:
<target name="GenerateWarFiles">
<path id="lib.jwsc.id">
<pathelement path="/opt/bea/weblogic91/server/lib/weblogic.jar"/>
</path>
<taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask" classpathref="lib.jwsc.id"/>
<jwsc srcdir="${src.java.dir}" destdir="${build.war.file.dir}" verbose="on" debug="on" classpathref="lib.jwsc.id">
<jws file="sep/com/bt/prf/jws/TypeImpl.java" compiledWsdl="${ivy.lib.dir}/WSDLC/Jwslib-8.0.jar" />
</jwsc>
</target>
我收到以下错误。
[AntUtil.deleteDir] Deleting directory /var/tmp/_927vxb
BUILD FAILED
/wls_domains/CIT/cruisecontrol-bin-2.8.3/util/Ivy/build.xml:231: Deployment descriptor: /var/tmp/_927vxb/web.xml does not exist.
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:184)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
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 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: Deployment descriptor: /var/tmp/_927vxb/web.xml does not exist.
at org.apache.tools.ant.taskdefs.War.setWebxml(War.java:95)
at weblogic.wsee.tools.anttasks.JwscTask.jar(JwscTask.java:397)
at weblogic.wsee.tools.anttasks.JwscTask.pkg(JwscTask.java:331)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:166)
... 17 more
--- Nested Exception ---
Deployment descriptor: /var/tmp/_927vxb/web.xml does not exist.
at org.apache.tools.ant.taskdefs.War.setWebxml(War.java:95)
at weblogic.wsee.tools.anttasks.JwscTask.jar(JwscTask.java:397)
at weblogic.wsee.tools.anttasks.JwscTask.pkg(JwscTask.java:331)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:166)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
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 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Total time: 1 minute 3 seconds
我在 Solaris 中运行 weblogic91。
I am running a jwsc ant task to generate a war file. It is working fine for me if I add the weblogic.jar to classpath before running the ant script (CLASSPATH=/opt/bea/weblogic91/server/lib/weblogic.jar export CLASSPATH)
But is is not working if I add this in my build.xml as follows:
<target name="GenerateWarFiles">
<path id="lib.jwsc.id">
<pathelement path="/opt/bea/weblogic91/server/lib/weblogic.jar"/>
</path>
<taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask" classpathref="lib.jwsc.id"/>
<jwsc srcdir="${src.java.dir}" destdir="${build.war.file.dir}" verbose="on" debug="on" classpathref="lib.jwsc.id">
<jws file="sep/com/bt/prf/jws/TypeImpl.java" compiledWsdl="${ivy.lib.dir}/WSDLC/Jwslib-8.0.jar" />
</jwsc>
</target>
I am getting the following error.
[AntUtil.deleteDir] Deleting directory /var/tmp/_927vxb
BUILD FAILED
/wls_domains/CIT/cruisecontrol-bin-2.8.3/util/Ivy/build.xml:231: Deployment descriptor: /var/tmp/_927vxb/web.xml does not exist.
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:184)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
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 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: Deployment descriptor: /var/tmp/_927vxb/web.xml does not exist.
at org.apache.tools.ant.taskdefs.War.setWebxml(War.java:95)
at weblogic.wsee.tools.anttasks.JwscTask.jar(JwscTask.java:397)
at weblogic.wsee.tools.anttasks.JwscTask.pkg(JwscTask.java:331)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:166)
... 17 more
--- Nested Exception ---
Deployment descriptor: /var/tmp/_927vxb/web.xml does not exist.
at org.apache.tools.ant.taskdefs.War.setWebxml(War.java:95)
at weblogic.wsee.tools.anttasks.JwscTask.jar(JwscTask.java:397)
at weblogic.wsee.tools.anttasks.JwscTask.pkg(JwscTask.java:331)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:166)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
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 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Total time: 1 minute 3 seconds
I am running weblogic91 in Solaris.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我敢打赌,您的部署目标(此处未发布)正在尝试“清理”部署目录,并且当找不到名为
/var/tmp/_927vxb/ 的文件时失败web.xml
3 个建议:
从命令行运行
touch /var/tmp/_927vxb/web.xml
并尝试再次运行构建/部署。这将创建一个空文件,至少可以让您克服删除错误时未找到的文件。这不是一个长期解决方案,而是试图暴露真正的问题。查看
/wls_domains/CIT/cruisecontrol-bin-2.8.3/util/Ivy/build.xml
文件中的第 231 行。也许有一个delete
ant 任务因错误而失败
。如果是这种情况,请将 `failonerror="false" 添加到导致问题的 ant 任务中。在此处发布更多构建文件。能够将文件中的行号与错误对齐将有助于解决问题。
I'm betting that in your deployment target (Which isn't posted here) is trying to 'clean' up the deployment directory, and is failing when it can't find the file called
/var/tmp/_927vxb/web.xml
3 suggestions:
Run
touch /var/tmp/_927vxb/web.xml
from the command line and try to run the build/deployment again. This will create an empty file that will at least let you get past the file not found on delete error. This is not a long term solution, but rather an attempt to expose the real issue.Look at line 231 in your
/wls_domains/CIT/cruisecontrol-bin-2.8.3/util/Ivy/build.xml
file. Perhaps there is adelete
ant task that isfailing on error
. If this is the case, add `failonerror="false" to the ant task that is causing the issue.Post more of your build file here. Being able to align the line numbers in the file with the error will help in decoding the issue.