glassfish
  1. glassfish
  2. GLASSFISH-21139

NullPointer Exception in ContainerBackgroundProcessor[StandardEngine[glassfish-web]

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 4.1_b08
    • Fix Version/s: None
    • Component/s: cdi
    • Labels:
      None

      Description

      GlassFish 4.0.1 (from nightly build b08 03-Jul)
      JDK : build 1.8.0_05-b13
      OS : x86_64 GNU/Linux

      Glassfish log file keep getting filled with following errors. Log file getting full quickly because of following errors :

      [2014-07-21T15:16:37.643-0400] [glassfish 4.0] [INFO] [] [javax.enterprise.web.core] [tid: _ThreadID=142 _ThreadName=ContainerBackgroundProcessor[StandardEngine[glassfish-web].StandardHost[server].StandardContext[/CCWebTT]]] [timeMillis: 1405970197643] [levelValue: 800] [[
      Session event listener threw exception
      java.lang.NullPointerException
      at org.jboss.weld.servlet.WeldTerminalListener.getSessionContext(WeldTerminalListener.java:65)
      at org.jboss.weld.servlet.WeldTerminalListener.sessionDestroyed(WeldTerminalListener.java:57)
      at org.apache.catalina.session.StandardSession.expire(StandardSession.java:908)
      at org.apache.catalina.session.StandardSession.expire(StandardSession.java:852)
      at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:769)
      at org.apache.catalina.session.StandardManager.processExpires(StandardManager.java:1055)
      at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:6340)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1823)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1812)
      at java.lang.Thread.run(Thread.java:744)
      ]]

      [2014-07-21T16:42:21.367-0400] [glassfish 4.0] [INFO] [] [javax.enterprise.web.core] [tid: _ThreadID=67 _ThreadName=cc-http-listener(5)] [timeMillis: 1405975341367] [levelValue: 800] [[
      Session event listener threw exception
      java.lang.NullPointerException
      at org.jboss.weld.servlet.WeldTerminalListener.getSessionContext(WeldTerminalListener.java:65)
      at org.jboss.weld.servlet.WeldTerminalListener.sessionDestroyed(WeldTerminalListener.java:57)
      at org.apache.catalina.session.StandardSession.expire(StandardSession.java:908)
      at org.apache.catalina.session.StandardSession.expire(StandardSession.java:852)
      at org.apache.catalina.session.StandardSession.expire(StandardSession.java:840)
      at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1601)
      at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:204)
      at com.enterprise.mvc.impl.HttpUserRequest.setUserSession(HttpUserRequest.java:117)
      at com.enterprise.login.handler.LoginActionHandler.actionStartLogin(LoginActionHandler.java:157)
      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:483)
      at com.enterprise.mvc.impl.MultiActionHandler.handleRequest(MultiActionHandler.java:39)
      at com.enterprise.mvc.FrontControllerServlet.handleRequest(FrontControllerServlet.java:141)
      at com.enterprise.mvc.FrontControllerServlet.doGet(FrontControllerServlet.java:49)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
      at com.cuesol.cc.psa.web.filters.SingleLoginFilter.doFilter(SingleLoginFilter.java:88)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
      at com.cuesol.cc.psa.web.filters.ResponseHeaderLogger.doFilter(ResponseHeaderLogger.java:32)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
      at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
      at java.lang.Thread.run(Thread.java:744)
      ]]

        Activity

        Hide
        jjsnyder83 added a comment -

        Please provide more information. It appears that something must be starting the problem and then it continues on. And it may be caused by

        at com.enterprise.mvc.impl.MultiActionHandler.handleRequest(MultiActionHandler.java:39)

        Can you reproduce this regularly? If so can you send me an application along with instructions on how to cause this?

        Show
        jjsnyder83 added a comment - Please provide more information. It appears that something must be starting the problem and then it continues on. And it may be caused by at com.enterprise.mvc.impl.MultiActionHandler.handleRequest(MultiActionHandler.java:39) Can you reproduce this regularly? If so can you send me an application along with instructions on how to cause this?
        Hide
        n.prist added a comment -

        I get this error in log every time the GlassFish invalidate a browser session, after the session-timeout interval.
        I use GlassFish 4.0.1 b10 (also I reproduce this issue with the latest GlassFish 4.0.1 Nightly Build) with a small java enterprise application with few EJB 3.1 and an web project (war archive) with one servlet and 2 JSF pages.
        JDK: jdk-7u65
        OS: x86_64 GNU/Linux and Windows 7 64b

        The error is:
        [INFO] [] [javax.enterprise.web.core] [tid: _ThreadID=160 _ThreadName=ContainerBackgroundProcessor[StandardEngine[glassfish-web].StandardHost[server].StandardContext[]]] [timeMillis: 1407343189599] [levelValue: 800] [[
        Session event listener threw exception
        java.lang.NullPointerException
        at org.jboss.weld.servlet.WeldTerminalListener.getSessionContext(WeldTerminalListener.java:65)
        at org.jboss.weld.servlet.WeldTerminalListener.sessionDestroyed(WeldTerminalListener.java:57)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:908)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:852)
        at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:769)
        at org.apache.catalina.session.StandardManager.processExpires(StandardManager.java:1055)
        at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:6340)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1823)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1812)
        at java.lang.Thread.run(Thread.java:745)
        ]]

        Show
        n.prist added a comment - I get this error in log every time the GlassFish invalidate a browser session, after the session-timeout interval. I use GlassFish 4.0.1 b10 (also I reproduce this issue with the latest GlassFish 4.0.1 Nightly Build) with a small java enterprise application with few EJB 3.1 and an web project (war archive) with one servlet and 2 JSF pages. JDK: jdk-7u65 OS: x86_64 GNU/Linux and Windows 7 64b The error is: [INFO] [] [javax.enterprise.web.core] [tid: _ThreadID=160 _ThreadName=ContainerBackgroundProcessor[StandardEngine [glassfish-web] .StandardHost [server] .StandardContext[]]] [timeMillis: 1407343189599] [levelValue: 800] [[ Session event listener threw exception java.lang.NullPointerException at org.jboss.weld.servlet.WeldTerminalListener.getSessionContext(WeldTerminalListener.java:65) at org.jboss.weld.servlet.WeldTerminalListener.sessionDestroyed(WeldTerminalListener.java:57) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:908) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:852) at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:769) at org.apache.catalina.session.StandardManager.processExpires(StandardManager.java:1055) at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:6340) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1823) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1812) at java.lang.Thread.run(Thread.java:745) ]]
        Hide
        jassiS added a comment -

        We do have a process which runs every minute, and it is probably due to that. But same code and same process is running under current version of GlassFish 4.0 (build89). In that version we do not have this problem. So certainly something could be to done to fail safe it.

        Show
        jassiS added a comment - We do have a process which runs every minute, and it is probably due to that. But same code and same process is running under current version of GlassFish 4.0 (build89). In that version we do not have this problem. So certainly something could be to done to fail safe it.
        Hide
        n.prist added a comment -

        Hi all,
        My workaround was to change MyApp java class from type: javax.faces.bean.ApplicationScoped to javax.enterprise.context.ApplicationScoped and now I don't have any errors in console log using GlassFish 4.0.1 b11.
        I want to mention that I don't have any @EJB in this MyApp class.
        I will continue to do tests related to this issue.
        Regads

        Show
        n.prist added a comment - Hi all, My workaround was to change MyApp java class from type: javax.faces.bean.ApplicationScoped to javax.enterprise.context.ApplicationScoped and now I don't have any errors in console log using GlassFish 4.0.1 b11. I want to mention that I don't have any @EJB in this MyApp class. I will continue to do tests related to this issue. Regads
        Hide
        jjsnyder83 added a comment -

        This appears to be a duplicate of GLASSFISH-21166.

        Show
        jjsnyder83 added a comment - This appears to be a duplicate of GLASSFISH-21166 .

          People

          • Assignee:
            jjsnyder83
            Reporter:
            jassiS
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: