tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From François Courtault (JIRA) <j...@apache.org>
Subject [jira] [Comment Edited] (TOMEE-2150) Tomee 7.0.4 issue with CDI interceptor and WebServiceContext resource injection
Date Sun, 04 Nov 2018 18:22:00 GMT

    [ 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:21 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 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>

So the issue is still there :(


was (Author: fcourtau):
Hello,

Deploy my war test file 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>

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)

Mime
View raw message