glassfish
  1. glassfish
  2. GLASSFISH-13513

CDI Interceptor + EJB 3.1 + OSGi doesn't work

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_ms07
    • Component/s: ejb_container
    • Labels:
      None
    • Environment:

      Operating System: Linux
      Platform: Linux

    • Issuezilla Id:
      13,513

      Description

      This issue is similar to issue 11491 but differs as we use a highly modular
      enterprise application here using OSGi bundles.

      When trying to use an interceptor by using the annotation the following
      exception occurs during EJB access (called by a web service on top):

      WARNING: A system exception occurred during an invocation on EJB UserServiceImpl
      method public java.lang.Long
      org.glassfish.cditest.user.impl.UserServiceImpl.addUser(org.glassfish.cditest.user.api.model.User)
      throws javax.ejb.EJBException
      javax.ejb.EJBException
      at
      com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5184)
      at
      com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5082)
      at
      com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4870)
      at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2037)
      at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1988)
      at
      com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:203)
      at
      com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
      at $Proxy219.addUser(Unknown Source)
      at
      org.glassfish.cditest.user.impl.ws.UserServiceWS.addUser(UserServiceWS.java:47)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at
      org.glassfish.webservices.InstanceResolverImpl$1.invoke(InstanceResolverImpl.java:141)
      at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
      at
      com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
      at
      com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:95)
      at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:637)
      at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:596)
      at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:581)
      at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:478)
      at
      com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:112)
      at org.glassfish.webservices.MonitoringPipe.process(MonitoringPipe.java:142)
      at
      com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
      at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:637)
      at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:596)
      at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:581)
      at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:478)
      at
      com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:112)
      at
      com.sun.enterprise.security.webservices.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:199)
      at
      com.sun.enterprise.security.webservices.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:131)
      at
      com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
      at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:637)
      at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:596)
      at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:581)
      at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:478)
      at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:310)
      at
      com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:600)
      at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:264)
      at
      com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:144)
      at org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:159)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      at
      org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1522)
      at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
      at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at
      org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at
      org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
      at
      com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
      at
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
      at
      org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
      at
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
      at
      com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:824)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:721)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1014)
      at
      com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:220)
      at
      com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
      at
      com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
      at
      com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
      at
      com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
      at
      com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
      at
      com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:530)
      at
      com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:511)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalStateException: Singleton not set for
      WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)
      at
      org.glassfish.weld.ACLSingletonProvider$ACLSingleton.get(ACLSingletonProvider.java:110)
      at org.jboss.weld.Container.instance(Container.java:58)
      at
      org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:45)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at
      com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
      at
      com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
      at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
      at
      com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
      at
      com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at
      com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
      at
      com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
      at
      com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:371)
      at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5329)
      at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5317)
      at
      com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:195)
      ... 62 more

      The whole test setup is made up of four bundles:

      • security.api (containing a "Secure" annotation + interceptor binding)
      • security.impl (containing the interceptor implementation)
      • user.impl (containing a local ejb)
      • user.ws (containing a simple web service for remote testing)
      1. client.zip
        1 kB
        marina vatkina
      2. interceptor-osgi-test.tar.gz
        9 kB
        chaoslayer
      3. README
        0.4 kB
        Sanjeeb Sahoo
      4. server.log
        28 kB
        marina vatkina

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            marina vatkina
            Reporter:
            chaoslayer
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: