Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-2719

NullPointerException on first request after deployment using beans.xml

    XMLWordPrintable

Details

    • Hide

      1) Start WildFly AS
      2) Deploy using: mvn clean install wildfly:redeploy
      2) Visit the index of the WildFly AS
      3) Deploy using: mvn clean install wildfly:redeploy
      4) Visit the index again, this causes the NPE.

      Show
      1) Start WildFly AS 2) Deploy using: mvn clean install wildfly:redeploy 2) Visit the index of the WildFly AS 3) Deploy using: mvn clean install wildfly:redeploy 4) Visit the index again, this causes the NPE.
    • Workaround Exists
    • Hide

      Second request to the server resolves as normal and the expected HTML is rendered

      Show
      Second request to the server resolves as normal and the expected HTML is rendered

    Description

      A NullPointerException occurs on the first request to the WildFly AS if the war package already exists and has been deployed via maven on both occasions causing an 500 Internal Server Error on the client.

      Removing the beans.xml from WEB-INF stops the error from occurring but services aren't injected.

      02:36:11,177 ERROR [io.undertow.request] (default I/O-3) Blocking request failed HttpServerExchange

      { GET /}

      : java.lang.NullPointerException
      at org.jboss.weld.context.http.HttpConversationContextImpl.getRequestAttribute(HttpConversationContextImpl.java:47)
      at org.jboss.weld.context.http.HttpConversationContextImpl.getRequestAttribute(HttpConversationContextImpl.java:13)
      at org.jboss.weld.context.AbstractConversationContext.copyConversationIdGeneratorAndConversationsToSession(AbstractConversationContext.java:177)
      at org.jboss.weld.context.AbstractConversationContext.sessionCreated(AbstractConversationContext.java:185)
      at org.jboss.weld.servlet.ConversationContextActivator.sessionCreated(ConversationContextActivator.java:187)
      at org.jboss.weld.servlet.HttpContextLifecycle.sessionCreated(HttpContextLifecycle.java:122)
      at org.jboss.weld.servlet.WeldInitialListener.sessionCreated(WeldInitialListener.java:107)
      at io.undertow.servlet.core.ApplicationListeners.sessionCreated(ApplicationListeners.java:256)
      at io.undertow.servlet.core.SessionListenerBridge.sessionCreated(SessionListenerBridge.java:36)
      at io.undertow.server.session.SessionListeners.sessionCreated(SessionListeners.java:32)
      at io.undertow.server.session.InMemorySessionManager.createSession(InMemorySessionManager.java:121)
      at io.undertow.servlet.spec.ServletContextImpl.getSession(ServletContextImpl.java:677)
      at io.undertow.servlet.spec.ServletContextImpl.getSession(ServletContextImpl.java:691)
      at io.undertow.servlet.handlers.SessionRestoringHandler.handleRequest(SessionRestoringHandler.java:110)
      at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:56)
      at io.undertow.server.handlers.NameVirtualHostHandler.handleRequest(NameVirtualHostHandler.java:57)
      at io.undertow.server.handlers.error.SimpleErrorPageHandler.handleRequest(SimpleErrorPageHandler.java:76)
      at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:43)
      at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:158)
      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:164)
      at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:142)
      at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:46)
      at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
      at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66) [xnio-api-3.2.0.Beta4.jar:3.2.0.Beta4]
      at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:87) [xnio-nio-3.2.0.Beta4.jar:3.2.0.Beta4]
      at org.xnio.nio.WorkerThread.run(WorkerThread.java:531) [xnio-nio-3.2.0.Beta4.jar:3.2.0.Beta4]

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            jbodkin_jira James Bodkin (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: