Error when using cross-context RequestDispatcher.include/forward calls in CDI application

Solution Verified - Updated -

Issue

  • When we forward calls from one CDI application to another using the RequestDispatcher it fails with
java.lang.NullPointerException
    org.jboss.weld.context.AbstractBoundContext.deactivate(AbstractBoundContext.java:71)
    org.jboss.weld.context.http.HttpRequestContextImpl.deactivate(HttpRequestContextImpl.java:86)
    org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:103)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
    java.lang.Thread.run(Thread.java:722)

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.0, 6.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content