[ https://issues.apache.org/jira/browse/TOMEE-2150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16674464#comment-16674464 ]
François Courtault edited comment on TOMEE-2150 at 11/4/18 6:33 PM: -------------------------------------------------------------------- Hello, Deploy my war test file (webservicecontext.war source code is included in there) on both TomEE 7.1.0 (cxf 3.1.15 embedded) and TomEE 8.0.0-M1 (cxf 3.2.6 embedded), each time I get: 04-Nov-2018 18:26:25.520 WARNING [localhost-startStop-2] org.apache.openejb.cdi.CdiResourceInjectionService.fillInjectionProperties Injection data not found in JNDI context: jndiName='comp/env/com.mycompany.jaxws.MyManager/wsc', target=com.mycompany.jaxws.MyManager/wsc 04-Nov-2018 18:26:25.535 WARNING [localhost-startStop-2] org.apache.openejb.cdi.CdiResourceInjectionService.fillInjectionProperties Injection data not found in JNDI context: jndiName='comp/env/com.mycompany.jaxws.MyManager/wsc', target=com.mycompany.jaxws.MyManager/wsc which causes the NPE when I sent to [http://localhost:8080/webservicecontext/MyManagerService,] the following payload: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://com.test/wsdl"> <soapenv:Header/> <soapenv:Body> <wsdl:helloWorld> <!--Optional:--> <arg0>Test</arg0> </wsdl:helloWorld> </soapenv:Body> </soapenv:Envelope> I remind you that the issue is a kind of conflict between an Interceptor and the WebService Context injection. Indeed , if I remove @Logged in MyManager.java file, rebuild everything and redeploy everything works fine but still have one WARNING instead of 2 in the logs. No issue on other app server vendors ! So the issue is still there :( was (Author: fcourtau): Hello, Deploy my war test file (webservicecontext.war source code is included in there) on both TomEE 7.1.0 (cxf 3.1.15 embedded) and TomEE 8.0.0-M1 (cxf 3.2.6 embedded), each time I get: 04-Nov-2018 18:26:25.520 AVERTISSEMENT [localhost-startStop-2] org.apache.openejb.cdi.CdiResourceInjectionService.fillInjectionProperties Injection data not found in JNDI context: jndiName='comp/env/com.mycompany.jaxws.MyManager/wsc', target=com.mycompany.jaxws.MyManager/wsc 04-Nov-2018 18:26:25.535 AVERTISSEMENT [localhost-startStop-2] org.apache.openejb.cdi.CdiResourceInjectionService.fillInjectionProperties Injection data not found in JNDI context: jndiName='comp/env/com.mycompany.jaxws.MyManager/wsc', target=com.mycompany.jaxws.MyManager/wsc which causes the NPE when I sent to [http://localhost:8080/webservicecontext/MyManagerService,] the following payload: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://com.test/wsdl"> <soapenv:Header/> <soapenv:Body> <wsdl:helloWorld> <!--Optional:--> <arg0>Test</arg0> </wsdl:helloWorld> </soapenv:Body> </soapenv:Envelope> I remind you that the issue is a kind of conflict between an Interceptor and the WebService Context injection. Indeed , if I remove @Logged in MyManager.java file, rebuild everything and redeploy everything works fine. No issue on other app server vendors ! So the issue is still there :( > Tomee 7.0.4 issue with CDI interceptor and WebServiceContext resource > injection > -------------------------------------------------------------------------------- > > Key: TOMEE-2150 > URL: https://issues.apache.org/jira/browse/TOMEE-2150 > Project: TomEE > Issue Type: Bug > Affects Versions: 7.0.4, 8.0.0-M1, 7.0.5, 7.1.0 > Reporter: François Courtault > Priority: Critical > Attachments: WebServiceWithAnCdiInterceptorTest.java, > reproduction_problem.zip, webservicecontext.war > > > I have defined an annotation like below: > @Inherited > @InterceptorBinding > @Target({ElementType.METHOD, ElementType.TYPE}) > @Retention(RetentionPolicy.RUNTIME) > public @interface MyInterceptor { > @NonBinding > String level() default "INFO"; > } > Then, I have written a class like this: > @MyInterceptor > @Interceptor > public class MyInterceptor { > private Class<?> intercepted; > @AroundInvoke > public Object myMethod(final InvocationContext ctx) throws Exception { > ..... > } > } > In my POJO, webservice endpoint, I have: > @WebService(name = "MyManager", targetNamespace ="http://com.test/wsdl", > serviceName = "MyManagerService") > @MyInterceptor > public class MyManager implements IMyManager { > @resource > private WebServiceContext wsc; //=>=> ALWAYS null on TomEE 7.0.4!!! > .... > } > } > That's the test case I built which doesn't work on TomEE 7.0.4 but works on > Glassfish 4.1.2/5.0, Weblogic Server 12.2.1.3 and Wildfly 10.0.1/11.0.0. -- This message was sent by Atlassian JIRA (v7.6.3#76005)