0 Replies Latest reply on Jul 24, 2011 7:05 AM by Ralph Soika

    can not inject ejb from jar in glassfish v3

    Ralph Soika Apprentice

      Hi,


      I have some stateless ejb components bundled into a jar file. Now I try to use these components in a web module (glassfish 3).
      When I use the @EJB annotation my stateless ejb is injected into my backing bean and everything works well.
      But when I try to use @Inject instaed of @EJB I got the following exeption:



      SCHWERWIEGEND: Error Rendering View
      com.sun.faces.mgbean.ManagedBeanCreationException: Bei der Ressourcen-Einspeisung auf dem verwalteten Bean workflowMB ist ein Fehler aufgetreten.
           at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:229)
      ....
      .....
      Caused by: com.sun.faces.spi.InjectionProviderException: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting invoke lifecycle  method public void org.imixs.application.cdi.example.WorkflowMB.reset() throws java.lang.Exception
           at org.glassfish.faces.integration.GlassFishInjectionProvider.invokePostConstruct(GlassFishInjectionProvider.java:235)
           at com.sun.faces.mgbean.BeanBuilder.invokePostConstruct(BeanBuilder.java:223)
           ... 59 more
      Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting invoke lifecycle  method public void org.imixs.application.cdi.example.WorkflowMB.reset() throws java.lang.Exception
           at org.glassfish.faces.integration.GlassFishInjectionProvider.invokeLifecycleMethod(GlassFishInjectionProvider.java:397)
           at org.glassfish.faces.integration.GlassFishInjectionProvider.invokePostConstruct(GlassFishInjectionProvider.java:310)
           at org.glassfish.faces.integration.GlassFishInjectionProvider.invokePostConstruct(GlassFishInjectionProvider.java:233)
           ... 60 more
      Caused by: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
           at java.security.AccessController.doPrivileged(Native Method)
           at org.glassfish.faces.integration.GlassFishInjectionProvider.invokeLifecycleMethod(GlassFishInjectionProvider.java:380)
           ... 62 more
      Caused by: java.lang.reflect.InvocationTargetException
           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.faces.integration.GlassFishInjectionProvider$2.run(GlassFishInjectionProvider.java:386)
           ... 64 more
      Caused by: java.lang.NullPointerException
           at org.imixs.application.cdi.example.WorkflowMB.reset(WorkflowMB.java:65)
           ... 69 more


      Can anybody help what this exception means?



      Ralph