Java 服务包装器的 JVM 错误
当我尝试启动刚刚使用 JSWrapper 作为 Windows 服务安装的服务时,这会出现在日志文件中
:包装| 2011/06/16 13:55:57 |启动 JVM...
错误 |包装| 2011/06/16 13:55:57 |加载应用程序时 JVM 退出。
状态 |包装| 2011/06/16 13:55:57 | JVM 重新启动已禁用。正在关闭。
状态 |包装| 2011/06/16 13:55:58 | <-- 包装器已停止
谁能告诉我需要做什么来解决这个问题?我已经安装了java并在环境变量中正确设置了路径。不知道发生了什么事。
This appears in a log file when I try to start a service I just installed as a windows service using the JSWrapper:
STATUS | wrapper | 2011/06/16 13:55:57 | Launching a JVM...
ERROR | wrapper | 2011/06/16 13:55:57 | JVM exited while loading the application.
STATUS | wrapper | 2011/06/16 13:55:57 | JVM Restarts disabled. Shutting down.
STATUS | wrapper | 2011/06/16 13:55:58 | <-- Wrapper Stopped
Can anyone tell me what needs to be done to fix this issue? I have java installed and paths set correctly in environment variables. Not sure what's going on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
由于Wrapper的初始化也没有JVM的输出,我想你的wrapper.java.command有问题......
你能通过在你的conf文件中设置wrapper.debug = true来启用调试模式吗?
您应该看到 Wrapper 尝试执行的 JVM 的命令行。
如果您在两个地方都没有看到任何问题,请发布输出并让我看一下......
干杯,
since there is also no output of the JVM from the Wrapper's initialization, I suppose there is sth wrong with your wrapper.java.command...
can you please enable debug mode by setting wrapper.debug=true in your conf file?
you should see the command line of the JVM the Wrapper is trying to execute.
If you don't see any problem in both places, please post the output and let me have a look at it...
cheers,
您的应用程序在启动时抛出一些异常。您需要找到抛出的日志,或者为程序设置一个捕获所有异常的处理程序来打印日志。您可以通过让 main 找出其线程组,然后设置 ThreadGroup 未捕获的异常处理程序。
Your application is throwing some exception while starting up. You need to find a log of what's being thrown, or else set an catch-all exception handler for the program to print a log. You do that by having your main find out its thread group, and then setting a ThreadGroup uncaught exception handler for it.
如果没有更多信息,很难回答你的问题。尝试在应用程序启动期间记录所有内容,并隔离退出 JVM 的代码部分。另外,检查 JSW 使用的 Java 版本 - 它与您在 Eclipse 中使用的版本相同吗?
It's a bit hard to answer your question without more info. Try logging everything during application startup, and isolate the part of code which exits JVM. Also, check Java version which are used by JSW - is it the same as the one you use in Eclipse?
我查了一下其他论坛。我完全卸载了计算机上的每个 java 版本,然后重新安装(按此顺序)java 8,然后是 java 8 jdk,然后是 java 8 jre。现在一切正常。 Eclipse 不需要任何更改或任何东西,我的应用程序运行良好。
I checked some other forum. I completelly uninstall every java version on my computer, and reinstall (in this order) java 8, then java 8 jdk, then java 8 jre. And everything works fine now. Eclipse doesn't require any change or anything, and my app works fine.