4 Replies Latest reply on Dec 30, 2008 4:01 AM by jaikiran

    Not injecting instanceId, no matching enc injector ...

    green_bean_1

      I am trying to get a very simple field resource injection example to work. however, when i deploy the example, i get the following error in the log file.

      15:26:44,644 WARN [ResourceHandler] Not injecting instanceId, no matching enc injector env/com.di.examples.ejb.StatelessLifecycleBean/instanceId found

      any ideas?

      thankx


      @Remote
      public class StatelessLifecycleBean implements HelloWorld {
       private static int instanceCount = 0;
      
      
       @Resource private Integer instanceId;
      
       private String instanceMessage;
      
       public StatelessLifecycleBean() {
       instanceId = ++instanceCount;
       instanceMessage = getClass().getSimpleName() + "-" + instanceId;
       }
      
       public String getMessage() {
       return instanceMessage;
       }
      



      ...
      <session>
       <ejb-name>StatelessLifecycle</ejb-name>
       <ejb-class>com.di.examples.ejb.StatelessLifecycleBean</ejb-class>
       <env-entry>
       <env-entry-name>instanceId</env-entry-name>
       <env-entry-type>java.lang.Integer</env-entry-type>
       <env-entry-value>5</env-entry-value>
       <injection-target>
       <injection-target-class>com.di.examples.ejb.StatelessLifecycleBean</injection-target-class>
       <injection-target-name>instanceId</injection-target-name>
       </injection-target>
       </env-entry>
       </session>
      ...