getAllDefinitions Proton CEP中的异常

时间:2015-12-14 15:47:32

标签: fiware

我已经在CentOS和Tomcat 7上的自己的服务器上部署了Proton CEP。

致电 /ProtonOnWebServerAdmin/resources/definitions

失败,但例外:

java.lang.NullPointerException
com.ibm.hrl.proton.admin.webapp.resources.DefinitionsResource.getAllDefinitions(DefinitionsResource.java:76)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:33)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:54)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleResourceMethod(FindResourceMethodHandler.java:151)
org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:65)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:95)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequest(HeadMethodHandler.java:53)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.internal.handlers.OptionsMethodHandler.handleRequest(OptionsMethodHandler.java:46)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.internal.handlers.SearchResultHandler.handleRequest(SearchResultHandler.java:33)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.internal.log.ResourceInvocation.handleRequest(ResourceInvocation.java:92)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.internal.log.Requests.handleRequest(Requests.java:76)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:48)
org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:207)
org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)
org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:119)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

其他API就像工作正常。例如:

PUT ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer 返回200 OK

我还可以使用:ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer

成功更改正在运行的实例的阶段

此外,定义应该是的文件夹是空的。在ProtonAdmin.properties中,它被配置为definitions-repository= / home / xmarine / ProtonDefinitions`

该文件夹的权限为:

[xmarine@app-fiware ProtonOnWebServerAdmin]$ ls -al /home/xmarine/ProtonDefinitions/
total 4
drwxrwxr-x 2 tomcat  tomcat     6 dec  8 12:18 .
drwx------ 7 xmarine xmarine 4096 dec 14 14:40 ..

你能帮我解决一下吗?

1 个答案:

答案 0 :(得分:1)

解决方案是修改definitions-repository中的ProtonAdmin.properties

以前是:/home/xmarine/ProtonDefinitions 新的是:/opt/definitions

另外,我必须让用户tomcat成为该文件夹的所有者:

sudo chown tomcat:root /opt/definitions