-
Bug
-
Resolution: Done
-
Major
-
jbossws-cxf-7.2.0.Final
-
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:
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)
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(); } 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
- Resolved
- is related to
-
JBWS-4385 Protect the jbossws runtime from loading the jaxp impl from application package
- Resolved