将 Ant 与 PHPUnderControl 一起使用会出现 java.lang.NoClassDefFoundError

发布于 2024-07-27 23:08:28 字数 1005 浏览 6 评论 0原文

我已经安装了最新的 CruiseControl 和 PHPUnderControl,并遵循了所有指示。 我陷入运行“../../apache-ant-1.7.0/bin/ant checkout”并得到下面的输出。 在Google上搜索错误,建议将JVM路径添加到Ant脚本中,但这并没有改变任何东西。

即使“ant --version”也会输出此错误。

在运行的任何其他应用程序上似乎没有其他与 java 相关的问题。

Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.tools.ant.launch.Launcher
   at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
   at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
   at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)
   at __gcj_personality_v0 (/var/www/internal/cruisecontrol/cruisecontrol-bin-2.8.2/projects/mytrial/java.version=1.4.2)
   at __libc_start_main (/lib/tls/libc-2.3.4.so)
   at _Jv_RegisterClasses (/var/www/internal/cruisecontrol/cruisecontrol-bin-2.8.2/projects/mytrial/java.version=1.4.2)

我已将 Ant 更新到 1.7.1,问题仍然存在。 我也尝试将 Java 更新到 1.6,但安装后仍然报告为 1.4.2。

类路径不是问题,Ant 网站明确表示不要使用 CLASSPATH。

I've installed the latest CruiseControl and PHPUnderControl, and followed all the directions.
I get stuck at running "../../apache-ant-1.7.0/bin/ant checkout" and get the output below.
Searching for the error on Google, it was suggested to add the JVM path to the Ant script, but this did not change anything.

Even "ant --version" outputs this error.

There seems to be no other java related issues on any other apps running.

Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.tools.ant.launch.Launcher
   at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
   at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
   at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)
   at __gcj_personality_v0 (/var/www/internal/cruisecontrol/cruisecontrol-bin-2.8.2/projects/mytrial/java.version=1.4.2)
   at __libc_start_main (/lib/tls/libc-2.3.4.so)
   at _Jv_RegisterClasses (/var/www/internal/cruisecontrol/cruisecontrol-bin-2.8.2/projects/mytrial/java.version=1.4.2)

I've updated Ant to 1.7.1 and the issue persists. I've also tried updating Java to 1.6, but after being installed it still reports as being 1.4.2.

Classpath was not the issue, and the Ant website explicitly says not to use CLASSPATH.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

纵性 2024-08-03 23:08:35

使用 Java 1.6 解决了这个问题。
我必须修改 /usr/sbin/alteratives 才能使用新版本的 Java。

Using Java 1.6 resolved the issue.
I had to modify /usr/sbin/alteratives to use the new version of Java.

没企图 2024-08-03 23:08:32

一种想法是尝试将 ant.jar 添加到类路径中。 您应该在 apache-ant-1.7.0/lib/ant.jar 中找到该 jar。 但是,我不知道如何在 PHPUnderControl 中指定类路径 - 我还没有看到该工具。

One idea would be to try to add the ant.jar to the classpath. You should find the jar at apache-ant-1.7.0/lib/ant.jar. However, I have no idea how do you specify the classpath in PHPUnderControl -- I haven't seen that tool.

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