-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
False
-
None
-
False
-
-
-
-
-
-
-
-
-
This issue happens after https://issues.redhat.com/browse/JBWS-4385 is fixed and sever throws IllegalStateException when call a handler with the CDI bean invocation. That cause of this exception is that the thread's context classloader in SOAP handler has changed from application module class loader to org.jboss.ws.common.utils.DelegateClassLoader in JBoss EAP 7.4.19. It works until JBoss EAP 7.4.18, so it's kind of compatibility issue.
15:36:18,744 WARNING [org.apache.cxf.jaxws.handler.HandlerChainInvoker] (default task-2) Handler execution raised a runtime exception.: java.lang.IllegalStateException: WFLYWELD0039: Singleton not set for org.jboss.ws.common.utils.DelegateClassLoader@49134e6f. This means that you are trying to access a weld deployment with a Thread Context ClassLoader that is not associated with the deployment. at org.jboss.as.weld@7.4.19.GA-redhat-00002//org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:77) at org.jboss.as.weld@7.4.19.GA-redhat-00002//org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:134) at org.jboss.weld.core@3.1.10.Final-redhat-00001//org.jboss.weld.Container.instance(Container.java:57) at org.jboss.as.weld@7.4.19.GA-redhat-00002//org.jboss.as.weld.WeldProvider.getCDI(WeldProvider.java:69) at javax.enterprise.api@2.0.2.redhat-00002//javax.enterprise.inject.spi.CDI.lambda$getCDIProvider$0(CDI.java:87) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176) at java.base/java.util.TreeMap$KeySpliterator.tryAdvance(TreeMap.java:2763) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543) at javax.enterprise.api@2.0.2.redhat-00002//javax.enterprise.inject.spi.CDI.getCDIProvider(CDI.java:88) at javax.enterprise.api@2.0.2.redhat-00002//javax.enterprise.inject.spi.CDI.current(CDI.java:64) at deployment.jaxws-server.war//org.example.soap.DelegateBean.<init>(DelegateBean.java:8) at deployment.jaxws-server.war//org.example.soap.LoggingHandler.handleMessage(LoggingHandler.java:17)
The soap handler:
public class LoggingHandler implements SOAPHandler<SOAPMessageContext> { @Override public boolean handleMessage(SOAPMessageContext soapMessageContext) { boolean isOutBound = (boolean) soapMessageContext.get(SOAPMessageContext.MESSAGE_OUTBOUND_PROPERTY); if (isOutBound) { System.out.println("### TCCL in SOAPHandler = " + Thread.currentThread().getContextClassLoader().toString()); new DelegateBean(); // Call CDI.current() when instantiating } return true; } }
DelegateBean.java
@Dependent public class DelegateBean { EmptyBean logic = CDI.current().select(EmptyBean.class).get(); }
- is cloned by
-
JBEAP-28310 [GSS](8.0.z) JBWS-4430 - Sever throws IllegalStateException when call a handler with the CDI bean invocation in EAP 8.0.3 or later
- New
- links to