6 Replies Latest reply on Jul 17, 2007 7:57 AM by Markus Schmitt

    Problems with Reference Injection for @EJB-Annotation

    Markus Schmitt Newbie

      Hi,
      I'm using the latest JEMS installer for my EJB3 project (no SEAM). I have trouble with the @EJB Annotation. To validate my problem I copied the Calculator und ShoppingCart bean to my workspace and added a @EJB Annotation to a new private Calculator field in the ShoppingCartBean class.
      Exception:

      [exec] 18:00:22,859 INFO [JmxKernelAbstraction] installing MBean:
      jboss.j2ee:jar=ejb.jar,name=ShoppingCartBean,service=EJB3 with
      dependencies:
      [exec] 18:00:22,890 WARN [ServiceController] Problem starting service jboss.j2ee:jar=ejb.jar,name=ShoppingCartBean,service=EJB3
      [exec] java.lang.RuntimeException: could not resolve global JNDI name for @EJB for container ShoppingCartBean: reference class:
      de.inno.rep.test.Calculator ejbLink: not used by any EJBs
      [exec] at
      org.jboss.injection.EjbEncInjector.inject(EjbEncInjector.java:88)
      [exec] at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:466)
      [exec] at
      org.jboss.ejb3.SessionContainer.start(SessionContainer.java:121)
      [exec] at
      org.jboss.ejb3.stateful.StatefulContainer.start(StatefulContainer.java:9
      1)
      [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
      Method)


      Thanks in advance!

      Markus