admin 发表于 2017-8-31 11:24:48

java.lang.Exception: 未知错误

<2017/08/31 10:37:44:308 > : 返回信息 : com.cloudmaster.rp.web.message.physicalMachine.pmManage.SyncPmInfoAndNetCardResp@5539169b
<2017/08/31 10:37:44:310 > : 服务器添加异常
<2017/08/31 10:37:44:310 > : Error :
java.lang.Exception: 未知错误
        at com.cloudmaster.cmp.resource.view.web.UnifyResourceAddAction.add(UnifyResourceAddAction.java:313)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:891)
        at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1293)
        at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)
        at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)
        at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108)
        at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1369)
        at ognl.ASTMethod.getValueBody(ASTMethod.java:90)
        at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
        at ognl.SimpleNode.getValue(SimpleNode.java:258)
        at ognl.Ognl.getValue(Ognl.java:494)
        at ognl.Ognl.getValue(Ognl.java:458)
        at com.opensymphony.xwork2.ognl.OgnlUtil$2.execute(OgnlUtil.java:309)
        at com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecute(OgnlUtil.java:340)
        at com.opensymphony.xwork2.ognl.OgnlUtil.getValue(OgnlUtil.java:307)
        at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:423)



通过排查,是因为配置文件读取时第一行被忽略:
修改配置文件:
webapps/clmrs/WEB-INF/classes/conf/other/

cat onecmdb.properties
#onecmdb
onecmdb.webservice.url=http\://clm.onecmdb.vip.com\:8186/webservice/onecmdb

注释行必须写,或者留空白,否则下面的参数被忽略,导致数据库连不上。

页: [1]
查看完整版本: java.lang.Exception: 未知错误