CruiseControl:从命令行运行 = 成功,因为 Windows 服务 = 失败
真心希望你能帮忙。我已经将 CruiseControl 配置为在办公室的备用 Windows XP 计算机上构建一个 java 项目,但是当通过 Windows 服务调用 CruiseControl 时,我发现它出现 ClassDefNotFound 错误。
确切的错误是: java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher
我知道它位于 ant-launcher.jar 文件中。
我已将此文件(以及所有其他 Ant 1.8.2 jar)放置在 CruiseControl 的 lib 子目录中。当使用以下命令从 CruiseControl 目录在命令行上运行时,我不会收到任何类路径错误:
cruisecontrol --configfile config.xml
我真的希望这对于新人来说是微不足道的,或者对以前走过这条路的人敲响警钟。
谢谢! 本
Really hope you can help. I've configured CruiseControl to build a java project on a spare Windows XP machine in the office, but am finding it errors out with a ClassDefNotFound when CruiseControl is invoked via a Windows Service.
The exact error is: java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher
I understand this to be in the ant-launcher.jar file.
I've placed this file (and all the other Ant 1.8.2 jars) in the lib subdirectory of CruiseControl. When run on the commandline from the CruiseControl directory with the following command, I don't get any classpath errors:
cruisecontrol --configfile config.xml
I'm really hoping this is either trivial to a fresh pair of eyes, or rings a bell with someone who's trodden this path before.
Thanks!
Ben
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的环境变量可能被定义为用户变量而不是系统变量。服务不会以普通用户身份运行。
Your environment variables are probably defined as user variables rather than system variables. Services will not be run as a normal user.
尝试从巡航控制安装路径调用 Cruisecontrol-launcher.jar 文件还确保巡航控制过程已作为服务启动。
例如:-
Try to invoke the cruisecontrol-launcher.jar file from your cruise control installation path & also ensure that cruise control process has been started as a service.
eg:-