【发布时间】:2016-07-19 11:13:09
【问题描述】:
你好。
今天我第一次尝试在 OS Windows 使用的 jar 中创建服务。 我尝试使用 java wrapper community edition 3.5.29
在windows中创建test_service就可以了。 对于下一步,我尝试启动新的 test_service。 服务尝试启动和关闭。 在日志中 JAVA WRAPPER 有此信息。
STATUS | wrapper | 2016/07/19 11:53:21 | --> Wrapper Started as Service
STATUS | wrapper | 2016/07/19 11:53:21 | Java Service Wrapper Community Edition 32-bit 3.5.29
STATUS | wrapper | 2016/07/19 11:53:21 | Copyright (C) 1999-2016 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2016/07/19 11:53:21 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2016/07/19 11:53:21 |
STATUS | wrapper | 2016/07/19 11:53:22 | Launching a JVM...
INFO | jvm 1 | 2016/07/19 11:53:22 | [11:53:22 19.07.2016]: Starting Oracle.
INFO | jvm 1 | 2016/07/19 11:53:22 | [11:53:22 19.07.2016]: Try Update.
INFO | jvm 1 | 2016/07/19 11:53:22 | [11:53:22 19.07.2016]: Update OK.
ERROR | wrapper | 2016/07/19 11:54:21 | Startup failed: Timed out waiting for a signal from the JVM.
ADVICE | wrapper | 2016/07/19 11:54:21 |
ADVICE | wrapper | 2016/07/19 11:54:21 | ------------------------------------------------------------------------
ADVICE | wrapper | 2016/07/19 11:54:21 | Advice:
ADVICE | wrapper | 2016/07/19 11:54:21 | The Wrapper consists of a native component as well as a set of classes
ADVICE | wrapper | 2016/07/19 11:54:21 | which run within the JVM that it launches. The Java component of the
ADVICE | wrapper | 2016/07/19 11:54:21 | Wrapper must be initialized promptly after the JVM is launched or the
ADVICE | wrapper | 2016/07/19 11:54:21 | Wrapper will timeout, as just happened. Most likely the main class
ADVICE | wrapper | 2016/07/19 11:54:21 | specified in the Wrapper configuration file is not correctly initializing
ADVICE | wrapper | 2016/07/19 11:54:21 | the Wrapper classes:
ADVICE | wrapper | 2016/07/19 11:54:21 | COM.MainRunner
ADVICE | wrapper | 2016/07/19 11:54:21 | While it is possible to do so manually, the Wrapper ships with helper
ADVICE | wrapper | 2016/07/19 11:54:21 | classes to make this initialization processes automatic.
ADVICE | wrapper | 2016/07/19 11:54:21 | Please review the integration section of the Wrapper's documentation
ADVICE | wrapper | 2016/07/19 11:54:21 | for the various methods which can be employed to launch an application
ADVICE | wrapper | 2016/07/19 11:54:21 | within the Wrapper:
ADVICE | wrapper | 2016/07/19 11:54:21 | http://wrapper.tanukisoftware.com/doc/english/integrate.html
ADVICE | wrapper | 2016/07/19 11:54:21 | ------------------------------------------------------------------------
ADVICE | wrapper | 2016/07/19 11:54:21 |
ERROR | wrapper | 2016/07/19 11:54:21 | JVM did not exit on request, termination requested.
STATUS | wrapper | 2016/07/19 11:54:21 | JVM exited after being requested to terminate.
STATUS | wrapper | 2016/07/19 11:54:26 | Launching a JVM...
INFO | jvm 2 | 2016/07/19 11:54:26 | [11:54:26 19.07.2016]: Starting Oracle.
INFO | jvm 2 | 2016/07/19 11:54:26 | [11:54:26 19.07.2016]: Try Update.
INFO | jvm 2 | 2016/07/19 11:54:27 | [11:54:26 19.07.2016]: Update OK.
如果我在我的类 COM.MainRunner 中没有正确理解 Wrapper 上的一些工具。
请帮助使用 java 包装器的简单工作示例。
【问题讨论】:
-
需要带有实现 WrapperListener 的示例 java 类