Inputttttt
Inputttttt
2017-06-30 10:25

用wrapper将一个java程序注册成本地服务,运行服务时总是失败,自动停止

101
  • java

联系qq1074098646
程序里面因为有
static final Properties PROP = new Properties();
static final String FILE_NALE = "token.properties";
PROP.load(new FileReader(FILE_NALE));
打的jar包里面也有这个文件,但是运行服务的时候就是找不到这个文件
STATUS | wrapper | 2017/06/30 18:02:37 | --> Wrapper Started as Console
STATUS | wrapper | 2017/06/30 18:02:37 | Java Service Wrapper Community Edition 32-bit 3.5.32
STATUS | wrapper | 2017/06/30 18:02:37 | Copyright (C) 1999-2017 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper | 2017/06/30 18:02:37 | http://wrapper.tanukisoftware.com
STATUS | wrapper | 2017/06/30 18:02:37 |
STATUS | wrapper | 2017/06/30 18:02:37 | Launching a JVM...
INFO | jvm 1 | 2017/06/30 18:02:38 | WrapperManager: Initializing...
INFO | jvm 1 | 2017/06/30 18:02:38 | {"data":{"body":"E5287BF89CA18B28C39A1FE19F4A8B9D80DA6A43D5847A415A0E2E235B64A9DFBAF12F3963E947B1CAF2060F12EE1FB36E79B811A371BB1EF981F9A863302A51F4A01B203B27340ACD5003D125DD18EBEF789399C3EB48C73A95E2918F01E986","header":{"resCode":"1","resMsg":"登陆成功!","sign":"45ef089e22f4b329baf5d2fb82c6c7c2","timestamp":1498816958634},"version":1.0}}
INFO | jvm 1 | 2017/06/30 18:02:38 |
INFO | jvm 1 | 2017/06/30 18:02:38 | RspData [data=Data [body=E5287BF89CA18B28C39A1FE19F4A8B9D80DA6A43D5847A415A0E2E235B64A9DFBAF12F3963E947B1CAF2060F12EE1FB36E79B811A371BB1EF981F9A863302A51F4A01B203B27340ACD5003D125DD18EBEF789399C3EB48C73A95E2918F01E986, version=1.0, header=RspHeader [resCode=1, sign=45ef089e22f4b329baf5d2fb82c6c7c2, resMsg=登陆成功!, timestamp=1498816958634]]]
INFO | jvm 1 | 2017/06/30 18:02:38 | sign==>>2a2ef2f3c65cab2f5d382fabde409b05
INFO | jvm 1 | 2017/06/30 18:02:38 | keyFinal==>>3acb4f1e128cb148f5dda6a91e0878d0
INFO | jvm 1 | 2017/06/30 18:02:38 | {"token":"3c15a9f236cdba589d3d3a56e6b43c62","channelId":"4823017916041537875","userId":"32"}
INFO | jvm 1 | 2017/06/30 18:02:38 | RspData [data=Data [body=E5287BF89CA18B28C39A1FE19F4A8B9D80DA6A43D5847A415A0E2E235B64A9DFBAF12F3963E947B1CAF2060F12EE1FB36E79B811A371BB1EF981F9A863302A51F4A01B203B27340ACD5003D125DD18EBEF789399C3EB48C73A95E2918F01E986, version=1.0, header=RspHeader [resCode=1, sign=45ef089e22f4b329baf5d2fb82c6c7c2, resMsg=登陆成功!, timestamp=1498816958634]]]
INFO | jvm 1 | 2017/06/30 18:02:38 | java.io.FileNotFoundException: token.properties (系统找不到指定的文件。)
INFO | jvm 1 | 2017/06/30 18:02:38 | at java.io.FileInputStream.open(Native Method)
INFO | jvm 1 | 2017/06/30 18:02:38 | at java.io.FileInputStream.(FileInputStream.java:138)
INFO | jvm 1 | 2017/06/30 18:02:38 | at java.io.FileInputStream.(FileInputStream.java:97)
INFO | jvm 1 | 2017/06/30 18:02:38 | at java.io.FileReader.(FileReader.java:58)
INFO | jvm 1 | 2017/06/30 18:02:38 | at com.brt.monkey.app.action.MainTest.(MainTest.java:143)
INFO | jvm 1 | 2017/06/30 18:02:38 | at java.lang.Class.forName0(Native Method)
INFO | jvm 1 | 2017/06/30 18:02:38 | at java.lang.Class.forName(Class.java:186)
INFO | jvm 1 | 2017/06/30 18:02:38 | at org.tanukisoftware.wrapper.WrapperSimpleApp.(WrapperSimpleApp.java:211)
INFO | jvm 1 | 2017/06/30 18:02:38 | at org.tanukisoftware.wrapper.WrapperSimpleApp.main(WrapperSimpleApp.java:624)
STATUS | wrapper | 2017/06/30 18:02:40 | <-- Wrapper Stopped

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答