Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-831

Weld throws an NPE thrown during failover between to jboss servers

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Obsolete
    • Major
    • None
    • None
    • None
    • None

    Description

      In a two node jboss environment a failover throws an exception (see description in the forum reference):

      2011-01-18 20:55:13,222 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/clusteredcdi.web]] (ajp-127.0.0.1-8209-1) Exception sending request initialized lifecycle event to listener instance of class org.jboss.weld.servlet.WeldListener: java.lang.NullPointerException
      at org.jboss.weld.context.ForwardingContextual.toString(ForwardingContextual.java:52) [:6.0.0.Final]
      at java.lang.String.valueOf(String.java:2826) [:1.6.0_23]
      at java.lang.StringBuilder.append(StringBuilder.java:115) [:1.6.0_23]
      at org.jboss.weld.context.SerializableContextualInstanceImpl.toString(SerializableContextualInstanceImpl.java:67) [:6.0.0.Final]
      at java.lang.String.valueOf(String.java:2826) [:1.6.0_23]
      at java.lang.StringBuilder.append(StringBuilder.java:115) [:1.6.0_23]
      at org.jboss.weld.context.beanstore.AttributeBeanStore.attach(AttributeBeanStore.java:120) [:6.0.0.Final]
      at org.jboss.weld.context.AbstractBoundContext.activate(AbstractBoundContext.java:75) [:6.0.0.Final]
      at org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:161) [:6.0.0.Final]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:180) [:6.0.0.Final]
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:135) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:94) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:88) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.session.LockingValve.invoke(LockingValve.java:62) [:6.0.0.Final]
      at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
      at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
      at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:504) [:6.0.0.Final]
      at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:437) [:6.0.0.Final]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
      at java.lang.Thread.run(Thread.java:662) [:1.6.0_23]

      Steps to Reproduce:

      I have attached an ear file containing a single war module. Inside this war module there is a single class named Pojo (the source is there too) and a single xhtml page which uses the pojo class via CDI. It's very simple. (I have added a servlet filter that prints the session attributes for each request - but that can be removed if it is not wanted).

      Test Setup
      The jboss setup to use in order reproduce the problem is as follows:
      1. A single Jboss installation with two server configurations called node01 and node02 (these are both copies of the all configuration)
      2. An apache server in front of the two jboss nodes. The apache uses mod_cluster plugin.
      3. The setup is started with the following script (sorry it is for ms windows):

      start %~dp0..\..\apache-2.2\bin\httpd.exe
      && sleep 10
      && start %~dp0run.bat -c node01 -Djboss.jvmRoute=node01 -Djboss.mod_cluster.proxyList=127.0.0.1:6666 -Djboss.mod_cluster.excludedContexts=ROOT -Djboss.service.binding.set=ports-01
      && sleep 10&& start %~dp0run.bat -c node02 -Djboss.jvmRoute=node02 -Djboss.mod_cluster.proxyList=127.0.0.1:6666 -Djboss.mod_cluster.excludedContexts=ROOT -Djboss.service.binding.set=ports-02
      && sleep 45
      && start http://localhost:8080/mod_cluster-manager

      4. Deploy the the clusteredcdi.ear file to farm folder belonging to one of the jboss configurations being used.

      Test execution
      1. Make a request via the apache server http://localhost:8080/clusteredcdi.web/faces/pages/cdi.xhtml
      2. Enter something into the form and submit via the "set new value" button.
      3. Kill the jboss server process that handled the request
      4. Refresh the browser window in which the request above was submitted.
      5. The error occurs.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fsotest Fin Steenbjerg (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: