Uploaded image for project: '[Read Only] - Hippo Essentials'
  1. [Read Only] - Hippo Essentials
  2. ESSENTIALS-687

Many NPEs logged as ERROR when project.basedir is not set

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Duplicate
    • CMS-10.0-alpha-1
    • None
    • None
    • None

    Description

      Essentials logs many NullPointerExceptions when the 'project.basedir' environment variable is not set. Instead the Essentials UI should simply show an error message saying 'project.basedir' is needed for Essentials to function. It should still be possible to run the project, view the site and use the CMS without having 'project.basedir' set.

      Steps to reproduce:
      1. in the root pom.xml of the archetype, comment the line '<project.basedir>${project.basedir}</project.basedir>'

      2. start the project with 'mvn -Pcargo.run -Drepo.path=storage'

      Expected: no errors in the logs
      The following error keep being logged many times:

      24.04.2015 15:40:06 ERROR http-nio-8080-exec-9 [AbstractFaultChainInitiatorObserver.onMessage:115] Error occurred during error handling, give up!
      org.apache.cxf.interceptor.Fault
      at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:163)
      at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:129)
      at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)
      at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
      at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
      at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)
      at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:197)
      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:149)
      at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:290)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:214)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:265)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
      at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:106)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      at org.apache.catalina.core.StandardHostValve.__invoke(StandardHostValve.java:142)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
      at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1517)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1474)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      at org.onehippo.cms7.essentials.plugin.PluginStore.getAllPlugins(PluginStore.java:131)
      at org.onehippo.cms7.essentials.plugin.PluginStore.populateSystemInfo(PluginStore.java:180)
      at org.onehippo.cms7.essentials.rest.ProjectResource.ping(ProjectResource.java:96)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:181)
      at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:97)
      ... 39 more

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mdenburger Mathijs den Burger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: