-
Bug
-
Resolution: Done
-
Major
-
None
-
None
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 JAXPDelegateClassLoader in JBoss EAP 8.0.3+. It works until JBoss EAP 8.0.2.1, so it's kind of compatibility issue.
15:35:43,181 WARNING [org.apache.cxf.jaxws.handler.HandlerChainInvoker] (default task-2) Handler execution raised a runtime exception.: java.lang.IllegalStateException: Unable to access CDI at jakarta.enterprise.api@4.0.1//jakarta.enterprise.inject.spi.CDI.lambda$getCDIProvider$0(CDI.java:98) at java.base/java.util.Optional.orElseThrow(Optional.java:403) at jakarta.enterprise.api@4.0.1.redhat-00001//jakarta.enterprise.inject.spi.CDI.getCDIProvider(CDI.java:98) at jakarta.enterprise.api@4.0.1//jakarta.enterprise.inject.spi.CDI.current(CDI.java:65) 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) at deployment.jaxws-server.war//org.example.soap.LoggingHandler.handleMessage(LoggingHandler.java:11) at org.apache.cxf.impl//org.apache.cxf.jaxws.handler.HandlerChainInvoker.invokeHandleMessage(HandlerChainInvoker.java:355) at org.apache.cxf.impl//org.apache.cxf.jaxws.handler.HandlerChainInvoker.invokeHandlerChain(HandlerChainInvoker.java:254) at org.apache.cxf.impl//org.apache.cxf.jaxws.handler.HandlerChainInvoker.invokeProtocolHandlers(HandlerChainInvoker.java:131)
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(); }
- clones
-
JBEAP-28311 [GSS](7.4.z) Sever throws IllegalStateException when call a handler with the CDI bean invocation in EAP 7.4.19
- New
-
JBWS-4430 Sever throws IllegalStateException when call a handler with the CDI bean invocation
- Resolved
- is caused by
-
JBWS-4385 Protect the jbossws runtime from loading the jaxp impl from application package
- Resolved
-
JBEAP-26932 (8.0.z) Upgrade apache-cxf from 4.0.0.redhat-00001 to 4.0.4 and jbossws to 7.1.0.Final
- Closed
- is incorporated by
-
JBEAP-28211 (8.0.z) Upgrade JBossws cxf from 7.1.0.Final-redhat-00002 to 7.3.0.Final-redhat-00001
- Resolved
- links to