12 Replies Latest reply on Apr 22, 2011 5:35 PM by G K

    EntityBean Error - Injection Target

    G K Newbie

      Hello Community,

       

      I have got a little problem with my j2ee application. I try to deploy it and i my jboss answers this exception:

       

       

      Deployment "vfszip:/D:/jboss-5.1.0.GA/server/default/deploy/AccountService.jar/" is in error due to the following reason(s): java.lang.RuntimeException: <injection-target> could not be found: com.openflow.account.AccountService.java:openflowDS
      

       

      I try to develop a EntityBean but it doenst work, i try and try...but everytime i get this problem.

       

      my datasource:

       

       

      <?xml version="1.0" encoding="UTF-8"?>
      <datasources>
      <local-tx-datasource>
      <jndi-name>openflowDS</jndi-name>
      <connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
      <driver-class>oracle.jdbc.OracleDriver</driver-class>
      <user-name>openflow</user-name>
      <password>openflow</password>
      <!-- the minimum size of the connection pool -->
      <min-pool-size>1</min-pool-size>
      <!-- The maximum connections in a pool/sub-pool -->
      <max-pool-size>4</max-pool-size>
      </local-tx-datasource>
      </datasources>
      

       

       

      My EntityBean:

       

       

      package com.openflow.account;
      
      import java.io.Serializable;
      
      import javax.persistence.Entity;
      import javax.persistence.EntityManager;
      import javax.persistence.Id;
      import javax.persistence.PersistenceContext;
      
      @Entity
      public class Account implements Serializable {
          /**
           * 
           */
          private static final long serialVersionUID = 1L;
          private String userId;
          private String password;
      
          @Id
          public String getUserId() {
              return userId;
          }
          public void setUserId(String userId) {
              this.userId = userId;
          }
          public String getPassword() {
              return password;
          }
          public void setPassword(String password) {
              this.password = password;
          }
      }
      

       

      and my SessionBean

       

       

      package com.openflow.account;
      
      import java.util.List;
      
      import javax.ejb.Stateless;
      import javax.persistence.EntityManager;
      import javax.persistence.PersistenceContext;
      
      /**
       * Session Bean implementation class AccountService
       */
      @Stateless
      
      public class AccountService implements AccountServiceRemote, AccountServiceLocal {
          @PersistenceContext(name="java:openflowDS")
          private EntityManager em;
          /**
           * Default constructor. 
           */
          public AccountService() {
              // TODO Auto-generated constructor stub
          }
      
      
      
          @Override
          public List getUsers() {
              // TODO Auto-generated method stub
              return null;
          }
      
      
      
          @Override
          public void login(String name, String password) {
              // TODO Auto-generated method stub
              System.out.println(name+" "+password);
          }
      
      
      
          @Override
          public void register(String name, String password) {
              // TODO Auto-generated method stub
              Account acc = new Account();
              acc.setUserId(name);
              acc.setPassword(password);
      
              em.persist(acc);
          }
      }
      

       

      I hope you can help me i dont know i work about 7hours at this problem please help me

       

      best regards gk

        • 1. EntityBean Error - Injection Target
          Wolf-Dieter Fink Master

          How your persistence.xml looks like?

          You shoud change the annotation @PersistenceContext(unitname="MyPersistenceUnit")

          ==> <persistence-unit name="MyPersistenceUnit"> (persistence.xml)

           

          It is not a reference to the datasource

          • 2. Re: EntityBean Error - Injection Target
            G K Newbie

            here is my persistence.xml

             

             

             

            <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
               <persistence-unit name="openflowDS">
                  <class>com.openflow.account.Account</class>
                  <jta-data-source>java:openflowDS</jta-data-source>
                  <properties>
                     <property name="javax.persistence.jdbc.driver" value="oracle.jdbc.OracleDriver"/>
                     <property name="javax.persistence.jdbc.user" value="openflow"/>
                     <property name="javax.persistence.jdbc.password" value="openflow"/>
                     <property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@localhost:1521:XE"/>
                     <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
                     <property name="hibernate.max_fetch_depth" value="3"/>
                  </properties>
               </persistence-unit>
            </persistence>
            
            • 3. EntityBean Error - Injection Target
              Wolf-Dieter Fink Master

              You should use the annotation @PersistenceContext(unitname="openflowDS"), this is working in my case.

               

              Also you might use the annotation without specifier if this is the one and only persistence context

              • 4. Re: EntityBean Error - Injection Target
                G K Newbie

                Thanks i works now but i have got another exception -.-

                 

                It cant commit and my transaction will be rolledback how can i fix it?

                 

                 

                Exception in thread "main" javax.ejb.EJBTransactionRolledbackException: Transaction rolled back
                    at org.jboss.ejb3.tx.Ejb3TxPolicy.handleEndTransactionException(Ejb3TxPolicy.java:54)
                    at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
                    at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
                    at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)
                    at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
                    at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
                    at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
                    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
                    at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
                    at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
                    at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
                    at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
                Caused by: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Could not commit transaction.
                    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1435)
                    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)
                    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
                    at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:170)
                    at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
                    at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)
                    at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
                    at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
                    at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
                    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
                    at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
                    at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
                    at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
                    at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
                    at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:211)
                    at org.jboss.remoting.Client.invoke(Client.java:1724)
                    at org.jboss.remoting.Client.invoke(Client.java:629)
                    at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
                    at $Proxy3.invoke(Unknown Source)
                    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
                    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
                    at $Proxy2.register(Unknown Source)
                    at Test.main(Test.java:28)
                    at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
                    at $Proxy3.invoke(Unknown Source)
                    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
                    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
                    at $Proxy2.register(Unknown Source)
                    at Test.main(Test.java:28)
                Caused by: java.lang.Throwable: setRollbackOnly called from:
                    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.setRollbackOnly(TransactionImple.java:392)
                    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.setRollbackOnly(BaseTransaction.java:195)
                    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.setRollbackOnly(BaseTransactionManagerDelegate.java:123)
                    at org.hibernate.ejb.AbstractEntityManagerImpl.markAsRollback(AbstractEntityManagerImpl.java:421)
                    at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:576)
                    at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
                    at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:513)
                    at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)
                    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)
                    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)
                    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
                    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1423)
                    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:137)
                    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
                    at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:170)
                    at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
                    at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
                    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                    at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)
                    at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
                    at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
                    at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
                    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
                    at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
                    at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
                    at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
                    at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
                
                • 5. EntityBean Error - Injection Target
                  Wolf-Dieter Fink Master

                  I'm not sure but I suppose that the transaction is marked for rollback because of you throw a RuntimeException and catch it?

                  It looks like that the TxManager mark the Tx for rollback before you try to commit.

                   

                  Think you should walk through your code ...

                  • 6. Re: EntityBean Error - Injection Target
                    G K Newbie

                    Hello Wolf-Dieter Fink,

                     

                    I was on the wrong way....that was my exception of my client I looked into my ServerLog and detected some SQL errors I fixed it. I know i am asking a lot of question but i try to study this technology just by myself only internet tutorials and forums postings ;-) Its hard to understand this technology.

                     

                    But i have got just one more question ;-)

                     

                    I created another persistance object and copied the first one the "Account"-object and filled it with information i tried to persist it but i have got a lots of errors and i cant find in the internet a solution for my problem because theres a different between hibernate and JPA

                     

                    My Exception from JBoss

                     

                    DEPLOYMENTS MISSING DEPENDENCIES:
                      Deployment "jboss.j2ee:jar=AccountService.jar,name=AccountService,service=EJB3" is missing the following dependencies:
                        Dependency "<UNKNOWN jboss.j2ee:jar=AccountService.jar,name=AccountService,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#openflowDS' **")
                      Deployment "jboss.j2ee:jar=AccountService.jar,name=AccountService,service=EJB3_endpoint" is missing the following dependencies:
                        Dependency "jboss.j2ee:jar=AccountService.jar,name=AccountService,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")
                      Deployment "jboss.j2ee:jar=AccountService.jar,name=SessionService,service=EJB3" is missing the following dependencies:
                        Dependency "<UNKNOWN jboss.j2ee:jar=AccountService.jar,name=SessionService,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=#openflowDS' **")
                      Deployment "jboss.j2ee:jar=AccountService.jar,name=SessionService,service=EJB3_endpoint" is missing the following dependencies:
                        Dependency "jboss.j2ee:jar=AccountService.jar,name=SessionService,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")
                    
                    DEPLOYMENTS IN ERROR:
                      Deployment "<UNKNOWN jboss.j2ee:jar=AccountService.jar,name=SessionService,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#openflowDS' **
                      Deployment "persistence.unit:unitName=#openflowDS" is in error due to the following reason(s): org.hibernate.AnnotationException: No identifier specified for entity: com.openflow.session.Session
                      Deployment "<UNKNOWN jboss.j2ee:jar=AccountService.jar,name=AccountService,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=#openflowDS' **
                    

                     

                    My Session Object

                     

                    package com.openflow.session;
                    
                    import java.io.Serializable;
                    
                    import javax.persistence.Column;
                    import javax.persistence.Entity;
                    import javax.persistence.Id;
                    import javax.persistence.Table;
                    
                    @Entity
                    @Table(name="SESSIONS")
                    public class Session implements Serializable {
                        private static final long serialVersionUID = 1L;
                        private String sessionId = null;
                        private String userId = null;
                        private String sessionMaxTime = null;
                        private String sessionStartTime = null;
                    
                        @Id
                        public void setSessionId(String sessionId) {
                            this.sessionId=sessionId;
                        }
                        public String getSessionId() {
                            return sessionId;
                        }
                       // @Column(name="USERID")
                        public void setUserId(String userId) {
                            this.userId=userId;
                        }    
                        public String getUserId() {
                            return userId; 
                        }
                       // @Column(name="SESSIONMAXTIME")
                        public void setSessionMaxTime(int seconds) {
                            this.sessionMaxTime=Integer.toString(seconds);
                        }
                        public String getSessionMaxTime() {
                            return sessionMaxTime;
                        }
                      //  @Column(name="SESSIONSTART")
                        public void setSessionStartTime(String time) {
                            this.sessionStartTime=time;
                        }
                        public String getSessionStartTime() {
                            return sessionStartTime;
                        }
                    }
                    

                     

                     

                    It looks like Account-object but it doenst work! In my persitance.xml i added another line with <class>classpath.Session</class> but doenst work

                     

                    Can you tell me a solution?

                     

                    best regards

                     

                    GK

                    • 7. EntityBean Error - Injection Target
                      Wolf-Dieter Fink Master

                      Hi GK,

                       

                      The log excerpt shows that: UNRESOLVED Demands 'persistence.unit:unitName=#openflowDS'

                      your persitance is not deployable, but you do not post the relevant log parts.

                       

                      Look into your log where the persistence is deployed and search WARN also.

                      You should attach the log part.

                       

                       

                      G K schrieb:

                       

                      Hello Wolf-Dieter Fink,

                       

                      I was on the wrong way....that was my exception of my client I looked into my ServerLog and detected some SQL errors I fixed it. I know i am asking a lot of question but i try to study this technology just by myself only internet tutorials and forums postings ;-) Its hard to understand this technology.

                       

                      No problem that is where the community is for

                      • 8. Re: EntityBean Error - Injection Target
                        G K Newbie
                        2011-04-21 14:05:54,345 INFO  [org.hibernate.ejb.Ejb3Configuration] (main) Processing PersistenceUnitInfo [
                            name: openflowDS
                            ...]
                        2011-04-21 14:05:54,360 WARN  [org.hibernate.ejb.Ejb3Configuration] (main) Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
                        2011-04-21 14:05:54,418 INFO  [org.hibernate.cfg.AnnotationBinder] (main) Binding entity from annotated class: com.openflow.session.Session
                        2011-04-21 14:05:54,460 INFO  [org.hibernate.cfg.annotations.EntityBinder] (main) Bind entity com.openflow.session.Session on table SESSIONS
                        2011-04-21 14:05:54,482 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=persistence.unit:unitName=#openflowDS state=Create
                        org.hibernate.AnnotationException: No identifier specified for entity: com.openflow.session.Session
                            at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:672)
                            at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:546)
                            at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
                            at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1148)
                            at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
                            at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173)
                            at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
                            at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:425)
                            at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
                            at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301)
                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                            at java.lang.reflect.Method.invoke(Unknown Source)
                            at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
                            at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
                            at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
                            at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
                            at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
                            at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
                            at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
                            at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
                            at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
                            at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
                            at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                            at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                            at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                            at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                            at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                            at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                            at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
                            at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
                            at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
                            at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
                            at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                            at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                            at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
                            at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
                            at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
                            at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
                            at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
                            at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                            at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                            at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                            at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                            at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                            at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
                            at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
                            at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
                            at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
                            at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
                            at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
                            at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                            at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                            at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                            at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                            at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                            at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                            at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
                            at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
                            at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
                            at org.jboss.Main.boot(Main.java:221)
                            at org.jboss.Main$1.run(Main.java:556)
                            at java.lang.Thread.run(Unknown Source)
                        

                         

                        This is the whole ERROR / WARN Log... Jboss cant find identifier for Session object, but i copied it 1 to 1 from Account-object!!!

                        • 9. Re: EntityBean Error - Injection Target
                          Wolf-Dieter Fink Master

                          I think you should move the annotation @Id to the getSessionId() method and also all other's.

                          I prefere the annotation at the instance variables

                          • 10. EntityBean Error - Injection Target
                            G K Newbie

                            Thanks alot it works again my mistake I was looking forward to call another LOCAL SessionBean but i never find a example how i can call a sbean in a sbean ? Can you help me?

                             

                            I tried to just call methods but i get (of course) NullPointer Exception.

                            • 11. EntityBean Error - Injection Target
                              Wolf-Dieter Fink Master

                              You using EJB3, thats a simple answer

                               

                              Two classes, e.g. FirstSLSBean and SecondSLSBean implement SecondSLS (as local interface)

                              You annotate in FirstSLS:

                              @EJB SecondSLS myLocalSLS;

                               

                              and you use like

                              myLocalSLS.myMethod(...)

                               

                              You have to have the local interface in the same jar/ear or in server.../lib/jar.

                               

                               

                              If you use EJB3.1 (JBoss6) forget the local interface it will not longer necessary

                              • 12. Re: EntityBean Error - Injection Target
                                G K Newbie

                                Yes, thats right....i ve got a book where this is written like you said but i show you now my class and the result

                                 

                                Thats my Annotations / Declarations:

                                 

                                @EJB(name="SessionService/local") ISession ssLocal;
                                

                                 

                                myMethod:

                                 

                                 

                                @Override
                                    public void login(String name, String password) {
                                        // TODO Auto-generated method stub
                                        Account account = getUserById(name);
                                        if(account!=null) {
                                            if(account.getPassword().equals(password.toUpperCase())) {
                                                try {
                                //                    ssLocal = (ISession) ctx.lookup("SessionService/local");
                                //                    System.out.println("abc");
                                                    Session session = ssLocal.getSession(account);
                                                    System.out.println("This SessionID: "+session.getSessionId());
                                                    System.out.println("This Session starts at: "+session.getSessionStartTime());
                                                } catch (Exception e) {
                                                    e.printStackTrace();
                                                }
                                            } else {
                                                throw new AccountException("Das Password ist falsch!");
                                            }
                                        } else {
                                            throw new AccountException("Der Benutzer ist nicht bekannt!");
                                        }
                                
                                        System.out.println(name+" "+password);
                                    } 
                                

                                 

                                 

                                and the error:

                                 

                                 

                                23:34:06,272 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
                                23:34:06,274 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
                                23:34:12,553 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
                                23:34:12,553 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
                                23:34:12,571 ERROR [TxPolicy] javax.ejb.EJBTransactionRolledbackException
                                23:34:12,571 ERROR [STDERR] javax.ejb.EJBTransactionRolledbackException
                                23:34:12,572 ERROR [STDERR]     at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
                                23:34:12,572 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,573 ERROR [STDERR]     at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:176)
                                23:34:12,573 ERROR [STDERR]     at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:216)
                                23:34:12,573 ERROR [STDERR]     at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
                                23:34:12,573 ERROR [STDERR]     at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
                                23:34:12,573 ERROR [STDERR]     at $Proxy247.getSession(Unknown Source)
                                23:34:12,573 ERROR [STDERR]     at com.openflow.account.AccountService.login(AccountService.java:56)
                                23:34:12,573 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                23:34:12,573 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                23:34:12,573 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                23:34:12,573 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                                23:34:12,573 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
                                23:34:12,573 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
                                23:34:12,573 ERROR [STDERR]     at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
                                23:34:12,573 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
                                23:34:12,573 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
                                23:34:12,573 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                23:34:12,573 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                23:34:12,573 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                23:34:12,573 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_5029782.invoke(InvocationContextInterceptor_z_fillMethod_5029782.java)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_5029782.invoke(InvocationContextInterceptor_z_setup_5029782.java)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
                                23:34:12,574 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
                                23:34:12,575 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,576 ERROR [STDERR]     at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
                                23:34:12,576 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,576 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:421)
                                23:34:12,576 ERROR [STDERR]     at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
                                23:34:12,576 ERROR [STDERR]     at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
                                23:34:12,576 ERROR [STDERR]     at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
                                23:34:12,576 ERROR [STDERR]     at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
                                23:34:12,576 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
                                23:34:12,576 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
                                23:34:12,576 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
                                23:34:12,576 ERROR [STDERR]     at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
                                23:34:12,576 ERROR [STDERR] Caused by: java.lang.NullPointerException
                                23:34:12,576 ERROR [STDERR]     at com.openflow.tools.IDProducter.getID(IDProducter.java:53)
                                23:34:12,577 ERROR [STDERR]     at com.openflow.session.SessionService.getSession(SessionService.java:33)
                                23:34:12,577 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                23:34:12,577 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                23:34:12,577 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                23:34:12,577 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                                23:34:12,577 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
                                23:34:12,577 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
                                23:34:12,577 ERROR [STDERR]     at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
                                23:34:12,577 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
                                23:34:12,577 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
                                23:34:12,577 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                23:34:12,577 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                23:34:12,577 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                23:34:12,577 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                                23:34:12,577 ERROR [STDERR]     at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
                                23:34:12,577 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,577 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
                                23:34:12,577 ERROR [STDERR]     at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_5029782.invoke(InvocationContextInterceptor_z_fillMethod_5029782.java)
                                23:34:12,577 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_5029782.invoke(InvocationContextInterceptor_z_setup_5029782.java)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
                                23:34:12,578 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                                23:34:12,578 ERROR [STDERR]     ... 79 more
                                

                                 

                                It's like you said but i dont know?!