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

发布于 2024-10-09 18:57:41 字数 4081 浏览 2 评论 0原文

我正在运行 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人生百味 2024-10-16 18:57:41

我敢打赌,您的部署目标(此处未发布)正在尝试“清理”部署目录,并且当找不到名为 /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. 在此处发布更多构建文件。能够将文件中的行号与错误对齐将有助于解决问题。

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:

  1. 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.

  2. Look at line 231 in your /wls_domains/CIT/cruisecontrol-bin-2.8.3/util/Ivy/build.xml file. Perhaps there is a delete ant task that is failing on error. If this is the case, add `failonerror="false" to the ant task that is causing the issue.

  3. 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文