glassfish
  1. glassfish
  2. GLASSFISH-18748

[osgi/cdi] An OSGi Service cannot be injected into a Stateful EJB

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2
    • Fix Version/s: None
    • Component/s: OSGi-JavaEE
    • Labels:
      None

      Description

      An OSGi Service cannot be injected into a Stateful EJB

      org.jboss.weld.exceptions.UnserializableDependencyException: WELD-001413 The bean Session bean [class com.mm.keygenerator.Home with qualifiers [@Any @Default @Named]; local interfaces are [Home] declares passivating scope but has non-serializable dependency org.glassfish.osgicdi.impl.OSGiServiceExtension$OSGiServiceBean@3c1597f8
              at org.jboss.weld.bootstrap.Validator.validateInjectionPointPassivationCapable(Validator.java:323)
              at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:294)
              at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:243)
              at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:106)
              at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:126)
              at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:345)
              at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:330)
              at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
              at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:199)
              at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)
              at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:313)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
              at org.glassfish.osgijavaeebase.OSGiDeploymentRequest.deploy(OSGiDeploymentRequest.java:183)
              at org.glassfish.osgijavaeebase.OSGiDeploymentRequest.execute(OSGiDeploymentRequest.java:118)
              at org.glassfish.osgijavaeebase.AbstractOSGiDeployer.deploy(AbstractOSGiDeployer.java:121)
              at org.glassfish.osgijavaeebase.OSGiContainer.deploy(OSGiContainer.java:154)
              at org.glassfish.osgijavaeebase.JavaEEExtender.deploy(JavaEEExtender.java:107)
              at org.glassfish.osgijavaeebase.JavaEEExtender.access$200(JavaEEExtender.java:61)
              at org.glassfish.osgijavaeebase.JavaEEExtender$HybridBundleTrackerCustomizer$1.call(JavaEEExtender.java:151)
              at org.glassfish.osgijavaeebase.JavaEEExtender$HybridBundleTrackerCustomizer$1.call(JavaEEExtender.java:148)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:722)
      
              at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:202)
              at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)
              at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:313)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
              at org.glassfish.osgijavaeebase.OSGiDeploymentRequest.deploy(OSGiDeploymentRequest.java:183)
              ... 12 more
      Caused by: org.jboss.weld.exceptions.DeploymentException: Exception List with 2 exceptions:
      Exception 0 :
      org.jboss.weld.exceptions.UnserializableDependencyException: WELD-001413 The bean @New Session bean [class com.mm.keygenerator.Home with qualifiers [@New]; local interfaces are [Home] declares passivating scope but has non-serializable dependency org.glassfish.osgicdi.impl.OSGiServiceExtension$OSGiServiceBean@3c1597f8
              at org.jboss.weld.bootstrap.Validator.validateInjectionPointPassivationCapable(Validator.java:323)
              at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:294)
              at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:243)
              at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:106)
              at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:126)
              at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:345)
              at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:330)
              at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
              at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:199)
              at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)
              at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:313)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
              at org.glassfish.osgijavaeebase.OSGiDeploymentRequest.deploy(OSGiDeploymentRequest.java:183)
              at org.glassfish.osgijavaeebase.OSGiDeploymentRequest.execute(OSGiDeploymentRequest.java:118)
              at org.glassfish.osgijavaeebase.AbstractOSGiDeployer.deploy(AbstractOSGiDeployer.java:121)
              at org.glassfish.osgijavaeebase.OSGiContainer.deploy(OSGiContainer.java:154)
              at org.glassfish.osgijavaeebase.JavaEEExtender.deploy(JavaEEExtender.java:107)
              at org.glassfish.osgijavaeebase.JavaEEExtender.access$200(JavaEEExtender.java:61)
              at org.glassfish.osgijavaeebase.JavaEEExtender$HybridBundleTrackerCustomizer$1.call(JavaEEExtender.java:151)
              at org.glassfish.osgijavaeebase.JavaEEExtender$HybridBundleTrackerCustomizer$1.call(JavaEEExtender.java:148)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
              at java.util.concurrent.FutureTask.run(FutureTask.java:166)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:722)
      

        Activity

        aaronjwhiteside created issue -
        Hide
        marina vatkina added a comment -

        Siva, Sahoo said it's your code...

        Show
        marina vatkina added a comment - Siva, Sahoo said it's your code...
        marina vatkina made changes -
        Field Original Value New Value
        Assignee marina vatkina [ mvatkina ] Sivakumar Thyagarajan [ sivakumart ]
        Component/s ejb_container [ 10596 ]
        Component/s OSGi-JavaEE [ 10642 ]
        Sanjeeb Sahoo made changes -
        Summary An OSGi Service cannot be injected into a Stateful EJB [osgi/cdi] An OSGi Service cannot be injected into a Stateful EJB
        Component/s OSGi-JavaEE [ 10642 ]
        Component/s OSGi [ 10641 ]

          People

          • Assignee:
            Sivakumar Thyagarajan
            Reporter:
            aaronjwhiteside
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: