使用 YAJSW 将 WSO2CEP 作为 Windows 服务启动时,找不到 Carbon Bootstrap class

Carbon Bootstrap class not found when using YAJSW to start WSO2CEP as Windows service

我们一直在使用 YAJSW version beta-12.05WSO2CEP 安装为 Windows 服务。它曾经工作过一次,直到我们重新启动服务器,它变得无法启动并报告如下错误日志。

WARNING|wrapper|Service "WSO2 Carbon"|16-05-13 10:35:06|YAJSW: yajsw-beta-12.04
WARNING|wrapper|Service "WSO2 Carbon"|16-05-13 10:35:06|OS   : Windows 7/6.1/amd64
WARNING|wrapper|Service "WSO2 Carbon"|16-05-13 10:35:06|JVM  : Oracle Corporation/1.8.0_74/C:\Program Files\Java\jdk1.8.0_74\jre/64
WARNING|wrapper|Service "WSO2 Carbon"|16-05-13 10:35:07|working directory ?unresolved?\ not found
INFO|wrapper|Service "WSO2 Carbon"|16-05-13 10:35:08|started process with pid 3900
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|[INFO] StandardFileSystemManager - Using "C:\Programs\WSO2CEP\yajsw-beta-12.05\?unresolved?\tmp\vfs_cache" as temporary files store.
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|java.lang.ClassNotFoundException: org.wso2.carbon.bootstrap.Bootstrap
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|    at org.rzo.yajsw.app.WrapperManagerImpl.init(WrapperManagerImpl.java:327)
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|    at org.rzo.yajsw.app.WrapperManagerProxy.getWrapperManager(WrapperManagerProxy.java:53)
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|    at org.rzo.yajsw.app.AbstractWrapperJVMMain.run(AbstractWrapperJVMMain.java:64)
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|    at java.security.AccessController.doPrivileged(Native Method)
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|    at org.rzo.yajsw.app.AbstractWrapperJVMMain.preExecute(AbstractWrapperJVMMain.java:56)
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|    at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:41)
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|error finding main method in class: org.wso2.carbon.bootstrap.Bootstrap : org.wso2.carbon.bootstrap.Bootstrap
INFO|3900/0|Service "WSO2 Carbon"|16-05-13 10:35:09|no java main method found -> aborting
INFO|wrapper|Service "WSO2 Carbon"|16-05-13 10:35:09|executed script: scripts/trayMessage.gv 1
INFO|wrapper|Service "WSO2 Carbon"|16-05-13 10:35:10|restart process due to default exit code rule
INFO|wrapper|Service "WSO2 Carbon"|16-05-13 10:35:10|restart internal RUNNING
INFO|wrapper|Service "WSO2 Carbon"|16-05-13 10:35:10|stopping process with pid/timeout 3900 45000
INFO|wrapper|Service "WSO2 Carbon"|16-05-13 10:35:10|process exit code: 999

但是,如果我们只是通过 bin 文件夹中的 wso2server.bat 启动 WSO2CEP,它就可以工作。而且我也试过将整个YAJSW文件夹复制到另一台服务器并安装服务,它也可以。

似乎 WSO2CEP 和 YAJSW 都工作正常,但无法在特定服务器上作为服务启动。

具体服务器如下:

OS   : Windows 7/6.1/amd64
JVM  : Oracle Corporation/1.8.0_74/C:\Program Files\Java\jdk1.8.0_74\jre/64

请确保您已按照以下指南配置 jajsw conf。似乎您的工作目录设置不正确。 docs.wso2.com/display/Carbon443/Installing+as+a+Windows+Service