Uploaded image for project: 'Solder'
  1. Solder
  2. SOLDER-305

HttpSessionStatus.isActive and HttpSession.isNew() throw WELD-000052 Cannot return null from a non-dependent producer method

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.1.0.Beta2, 3.1.0.Beta5, 3.1.0.CR1
    • Fix Version/s: 3.1.0.Final
    • Component/s: Servlet
    • Labels:
      None
    • Environment:

      seam 3.1.0.CR1, Jetty 8

      Description

      We have this code in guvnor:

      @ApplicationScoped
      public class Backchannel {
      
          ...
      
          @Inject
          private HttpSessionStatus sessionStatus;
      
          ...
      
          public List<PushResponse> subscribe() {
              if (sessionStatus.isActive()) {
                  ...
              }
          }
          ...
      

      Which is a direct copy of this documented code:
      http://docs.jboss.org/seam/3/latest/reference/en-US/html_single/#injectablerefs.http_session_status

      which throws this exception:

      ERROR 06-10 14:38:59,303 (LoggingHelper.java:error:74) 	 Service method 'public abstract java.util.List org.drools.guvnor.client.rpc.RepositoryService.subscribe()' threw an unexpected exception: org.jboss.weld.exceptions.IllegalProductException: WELD-000052 Cannot return null from a non-dependent producer method:  [method] @Produces @Typed @RequestScoped protected org.jboss.seam.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()
      org.jboss.weld.exceptions.IllegalProductException: WELD-000052 Cannot return null from a non-dependent producer method:  [method] @Produces @Typed @RequestScoped protected org.jboss.seam.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()
      	at org.jboss.weld.bean.AbstractProducerBean.checkReturnValue(AbstractProducerBean.java:256)
      	at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:362)
      	at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:122)
      	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
      	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:124)
      	at org.jboss.weld.proxies.HttpServletRequest$-55412919$Proxy$_$$_WeldClientProxy.isRequestedSessionIdValid(HttpServletRequest$-55412919$Proxy$_$$_WeldClientProxy.java)
      	at org.jboss.seam.servlet.http.HttpSessionStatus.isActive(HttpSessionStatus.java:41)
      	at org.jboss.seam.servlet.http.HttpSessionStatus$Proxy$_$$_WeldClientProxy.isActive(HttpSessionStatus$Proxy$_$$_WeldClientProxy.java)
      	at org.drools.guvnor.server.Backchannel.subscribe(Backchannel.java:64)
      	at org.drools.guvnor.server.Backchannel$Proxy$_$$_WeldClientProxy.subscribe(Backchannel$Proxy$_$$_WeldClientProxy.java)
      	at org.drools.guvnor.server.ServiceImplementation.subscribe(ServiceImplementation.java:934)
      	at org.drools.guvnor.server.RepositoryServiceServlet.subscribe(RepositoryServiceServlet.java:689)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
      	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
      	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
      	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
      	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      	at org.mortbay.jetty.Server.handle(Server.java:324)
      	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
      	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
      	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
      	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
      	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
      	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
      

      Note: there is no seam 3 servlet JIRA project, so I dropped it under Seam 3 distribution.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  shane.bryzak Shane Bryzak
                  Reporter:
                  ge0ffrey Geoffrey De Smet
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: