[ https://jira.fiware.org/browse/HELP-9179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
José Ignacio Carretero Guarde resolved HELP-9179.
-------------------------------------------------
Resolution: Done
> [fiware-stackoverflow] Deploying CEP through WARs on CentOS VM - Proton Server issue
> ------------------------------------------------------------------------------------
>
> Key: HELP-9179
> URL: https://jira.fiware.org/browse/HELP-9179
> Project: Help-Desk
> Issue Type: Monitor
> Components: FIWARE-TECH-HELP
> Reporter: Backlog Manager
> Assignee: Backlog Manager
> Labels: cep, fiware
>
> Created question in FIWARE Q/A platform on 29-08-2015 at 18:08
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/32288173/deploying-cep-through-wars-on-centos-vm-proton-server-issue
> +Question:+
> Deploying CEP through WARs on CentOS VM - Proton Server issue
> +Description:+
> I've deployed the 4 war files for Fiware Proton CEP, I got a month ago on githug (I believe), on a CentOS 6 VM, after installing Java SE 8 and Tomcat 7. These WAR files where inside a zip file, but now I can't find it on github anymore.
> Beyond that, following the instructions for instalation and configuration, I was able to get everything almost working.
> The Authoring Tool is available and working (it exports definitions to the server's repository correctly).
> Working with Google's Postman for http verbs i find that:
> A GET on the repositories works and retrieves the definitions exported by the Authoring tool: http://{ip}:8080/ProtonOnWebServerAdmin/resources/definitions
> But a GET on the server:
> http://{ip}:8080/ProtonOnWebServerAdmin/resources/instances/ProtonOnWebServer
> ...doesn't work and responds the following html message:
> <html>
> <head>
> <title>Apache Tomcat/7.0.64 - Error report</title>
> <style>
> <!--H1 {
> font-family: Tahoma, Arial, sans-serif;
> color: white;
> background-color: #525D76;
> font-size: 22px;
> }
> H2 {
> font-family: Tahoma, Arial, sans-serif;
> color: white;
> background-color: #525D76;
> font-size: 16px;
> }
> H3 {
> font-family: Tahoma, Arial, sans-serif;
> color: white;
> background-color: #525D76;
> font-size: 14px;
> }
> BODY {
> font-family: Tahoma, Arial, sans-serif;
> color: black;
> background-color: white;
> }
> B {
> font-family: Tahoma, Arial, sans-serif;
> color: white;
> background-color: #525D76;
> }
> P {
> font-family: Tahoma, Arial, sans-serif;
> background: white;
> color: black;
> font-size: 12px;
> }
> A {
> color: black;
> }
> A.name {
> color: black;
> }
> HR {
> color: #525D76;
> }
> -->
> </style>
> </head>
> <body>
> <h1>HTTP Status 500 - java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory</h1>
> <HR size="1" noshade="noshade">
> <p>
> <b>type</b> Exception report
> </p>
> <p>
> <b>message</b>
> <u>java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory</u>
> </p>
> <p>
> <b>description</b>
> <u>The server encountered an internal error that prevented it from fulfilling this request.</u>
> </p>
> <p>
> <b>exception</b>
> <pre>javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:195)
> org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:119)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> </pre>
> </p>
> <p>
> <b>root cause</b>
> <pre>java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> org.apache.http.impl.client.AbstractHttpClient.<init>(AbstractHttpClient.java:182)
> org.apache.http.impl.client.DefaultHttpClient.<init>(DefaultHttpClient.java:150)
> com.ibm.hrl.proton.admin.webapp.resources.ProtonInstancesResource.getInstanceState(ProtonInstancesResource.java:248)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> java.lang.reflect.Method.invoke(Method.java:497)
> 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.handleSubResourceMethod(FindResourceMethodHandler.java:183)
> org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:110)
> 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:731)
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> </pre>
> </p>
> <p>
> <b>note</b>
> <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.64 logs.</u>
> </p>
> <HR size="1" noshade="noshade">
> <h3>Apache Tomcat/7.0.64</h3>
> </body>
> </html>
> So, I don't know what's wrong. It seems that it's some issue with Java configuration. I followed the installation instructions mentioned, so JAVA_HOME and CATALINA_HOME are set. I also set JDK_HOME to JAVA_HOME.
> Aparently ProtonServerAdmin works but ProtonServer itself doesn't, so I can't get CEP to really work.
> When I Reload the ProtonServer App from within Tomcat's Manager API, catalina.out logs the following:
> Aug 29, 2015 6:03:04 PM org.apache.catalina.core.StandardContext reload
> INFO: Reloading Context with name [/ProtonOnWebServer] has started
> Aug 29, 2015 6:03:04 PM com.ibm.hrl.proton.webapp.ProtonServletContextListener contextDestroyed
> INFO: shutting down ProtonServletContextListener
> Aug 29, 2015 6:03:04 PM com.ibm.hrl.proton.server.adapter.InputServer run
> INFO: Proton server has been shut down...
> Aug 29, 2015 6:03:04 PM com.ibm.hrl.proton.server.adapter.OutputServer run
> INFO: Proton server has been shut down ...
> Aug 29, 2015 6:03:04 PM com.ibm.hrl.proton.server.timerService.TimerServiceFacade destroyTimers
> INFO: TimerServiceFacade: destroying remaining timers...
> Aug 29, 2015 6:03:04 PM com.ibm.hrl.proton.server.timerService.TimerServiceFacade destroyTimers
> INFO: TimerServiceFacade: destroyed remaining timers...
> Aug 29, 2015 6:03:04 PM com.ibm.hrl.proton.webapp.ProtonServletContextListener contextDestroyed
> INFO: finished stopping servers successfully
> Aug 29, 2015 6:03:05 PM org.apache.catalina.startup.TldConfig execute
> INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
> Aug 29, 2015 6:03:05 PM com.ibm.hrl.proton.webapp.ProtonServletContextListener contextInitialized
> INFO: initializing ProtonServletContextListener
> Aug 29, 2015 6:03:05 PM com.ibm.hrl.proton.webapp.ProtonServletContextListener$1 run
> INFO: context real path = /opt/apache-tomcat-7.0.64/webapps/ProtonOnWebServer/
> 85 [http-bio-8080-exec-9] INFO org.apache.wink.server.internal.servlet.RestServlet - The system is using the com.ibm.hrl.proton.webapp.WebApplication JAX-RS application class that is named in the javax.ws.rs.Application init-param initialization parameter.
> Aug 29, 2015 6:03:05 PM com.ibm.hrl.proton.server.executor.PropertiesParser loadProperties
> INFO: Properties are :
> metadatFile =EmptyDefinition.json
> inputPortNumber =3002
> outputPortNumber =3302
> Aug 29, 2015 6:03:05 PM com.ibm.hrl.proton.webapp.ProtonServletContextListener$1 run
> INFO: init: initializing metadata and all the system singletons
> Aug 29, 2015 6:03:05 PM com.ibm.hrl.proton.webapp.ProtonServletContextListener$1 run
> INFO: init: done initializing metadata, returned the following exceptions:
> Aug 29, 2015 6:03:05 PM com.ibm.hrl.proton.webapp.ProtonServletContextListener$1 run
> INFO: init: done initializing singletons , starting the servers...
> Aug 29, 2015 6:03:05 PM com.ibm.hrl.proton.server.adapter.OutputServer run
> INFO: Proton output server started, listening on output port: 3302
> Aug 29, 2015 6:03:05 PM com.ibm.hrl.proton.server.adapter.InputServer run
> INFO: Proton server Started, listening on port: 3002
> 401 [http-bio-8080-exec-9] INFO org.apache.wink.server.internal.application.ApplicationProcessor - The following JAX-RS application has been processed: com.ibm.hrl.proton.webapp.WebApplication
> 402 [http-bio-8080-exec-9] INFO org.apache.wink.server.internal.log.Resources - The server has registered the JAX-RS resource class deprecated.EventResourcePlainTextDeprecated with @Path(/events-plain-text).
> 402 [http-bio-8080-exec-9] INFO org.apache.wink.server.internal.log.Resources - The server has registered the JAX-RS resource class deprecated.EventResourceJSONDeprecated with @Path(/events-json).
> 402 [http-bio-8080-exec-9] INFO org.apache.wink.server.internal.log.Resources - The server has registered the JAX-RS resource class com.ibm.hrl.proton.webapp.resources.EventResource with @Path(/events).
> 408 [http-bio-8080-exec-9] INFO org.apache.wink.server.internal.log.Providers - The class com.ibm.hrl.proton.webapp.providers.EventPlainTextMessageReader was registered as a JAX-RS MessageBodyReader provider for com.ibm.hrl.proton.runtime.event.interfaces.IEventInstance Java types and text/plain media types.
> 410 [http-bio-8080-exec-9] INFO org.apache.wink.server.internal.log.Providers - The class com.ibm.hrl.proton.webapp.providers.EventJSONMessageReader was registered as a JAX-RS MessageBodyReader provider for com.ibm.hrl.proton.runtime.event.EventInstance Java types and application/json media types.
> 410 [http-bio-8080-exec-9] INFO org.apache.wink.server.internal.log.Providers - The class com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader was registered as a JAX-RS MessageBodyReader provider for com.ibm.hrl.proton.runtime.event.EventInstance Java types and application/xml media types.
> 410 [http-bio-8080-exec-9] INFO org.apache.wink.server.internal.log.Providers - The class com.ibm.hrl.proton.webapp.exceptions.ResponseExceptionMapper was registered as a JAX-RS ExceptionMapper provider for com.ibm.hrl.proton.webapp.exceptions.ResponseException Java types.
> 467 [http-bio-8080-exec-9] INFO org.apache.wink.common.internal.application.ApplicationFileLoader - The runtime is loading the JAX-RS application from jar:file:/opt/apache-tomcat-7.0.64/webapps/ProtonOnWebServer/WEB-INF/lib/wink-json4j-provider-1.2.0-incubating.jar!/META-INF/wink-application
> Aug 29, 2015 6:03:06 PM org.apache.catalina.core.StandardContext reload
> INFO: Reloading Context with name [/ProtonOnWebServer] is completed
> ..which doesn't seem to show any cautionary report.
> And when I perform a GET on the server, catalina.out logs just:
> Aug 29, 2015 6:05:11 PM com.ibm.hrl.proton.admin.webapp.resources.ProtonInstancesResource getInstanceState
> INFO: starting getInstanceState
> 1584935 [http-bio-8080-exec-11] ERROR org.apache.wink.server.internal.RequestProcessor - An unhandled exception occurred which will be propagated to the container.
> ..so, no clues there.
> If you need more information please let me know.
> Thank you
--
This message was sent by Atlassian JIRA
(v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy