gpt4 book ai didi

java - 用于生成 webservice war 文件的 Weblogic Ant JWSC 任务

转载 作者:行者123 更新时间:2023-12-01 05:51:21 26 4
gpt4 key购买 nike

我正在运行 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。

最佳答案

我敢打赌,您的部署目标(此处未发布)正在尝试“清理”部署目录,并且当找不到名为 /var/tmp 的文件时会失败/_927vxb/web.xml

3条建议:

  1. 从命令行运行 touch/var/tmp/_927vxb/web.xml 并尝试再次运行构建/部署。这将创建一个空文件,至少可以让您克服删除错误时未找到的文件。这不是一个长期解决方案,而是试图揭露真正的问题。

  2. 查看 /wls_domains/CIT/cruisecontrol-bin-2.8.3/util/Ivy/build.xml 文件中的第 231 行。也许有一个 delete ant 任务因错误而失败。如果是这种情况,请将 `failonerror="false"添加到导致问题的 ant 任务中。

  3. 在此处发布更多构建文件。能够将文件中的行号与错误对齐将有助于解决问题。

关于java - 用于生成 webservice war 文件的 Weblogic Ant JWSC 任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4584254/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com