0 Replies Latest reply on Mar 24, 2006 4:26 PM by Cesar Villanueva

    Problem tarting service jboss.j2ee:service=EJB3

    Cesar Villanueva Newbie

      Hello everybody. I'm a newbie regarding EJB and i'm reading the book "Begining Java EE 5 from novice to professional" and im in chapter 10 "EJB Entity Beans". The thing is im trying to run the first example that is a CMP Entity Bean app, 1 entity bean and 1 session bean (the interface and the class) , i did all like the book says, i set the classpath in the app directory like this
      1.-
      set CLASSPATH=.;C:\programas\jboss-4.0.4RC1\lib\concurrent.jar;
      C:\programas\jboss-4.0.4RC1\client\jboss-j2ee.jar;
      C:\programas\jboss-4.0.4RC1\lib\jboss-common.jar;
      C:\programas\jboss-4.0.4RC1\server\all\lib\jboss.jar;
      C:\programas\jboss-4.0.4RC1\server\all\lib\jboss-remoting.jar;
      C:\programas\jboss-4.0.4RC1\server\all\lib\jboss-transaction.jar;
      C:\programas\jboss-4.0.4RC1\server\all\lib\jnpserver.jar;
      C:\programas\jboss-4.0.4RC1\server\all\lib\javax.servlet.jar;
      C:\programas\jboss-4.0.4RC1\server\all\deploy\ejb3.deployer\jboss-ejb3.jar;
      C:\programas\jboss-4.0.4RC1\server\all\deploy\ejb3.deployer\jboss-ejb3x.jar;
      C:\programas\jboss-4.0.4RC1\server\all\deploy\ejb3.deployer\ejb3-persistence.jar;
      C:\programas\jboss-4.0.4RC1\server\all\deploy\jboss-aop-jdk50.deployer\jboss-aop-jdk50.jar;
      C:\programas\jboss-4.0.4RC1\server\all\deploy\jboss-aop-jdk50.deployer\jboss-aspect-library-jdk50.jar

      2.- build classes (without errors or warnings)
      3.- build the bundle (file.ejb3)
      3.- deploy the app and it gives me the following errors:

      15:12:33,625 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=StockListBean, cl
      ass=beans.StockListBean, type=STATELESS
      15:12:33,671 INFO [Ejb3Deployment] EJB3 deployment time took: 234
      15:12:33,718 WARN [ServiceController] Ignoring request to stop nonexistent serv
      ice: jboss.j2ee:service=EJB3,jar=Stock.ejb3,name=StockListBean
      15:12:33,718 WARN [ServiceController] Ignoring request to destroy nonexistent s
      ervice: jboss.j2ee:service=EJB3,jar=Stock.ejb3,name=StockListBean
      15:12:33,718 WARN [ServiceController] Problem starting service jboss.j2ee:servi
      ce=EJB3,module=Stock.ejb3
      java.lang.RuntimeException: Field private javax.persistence.EntityManager beans.
      StockListBean._manager @PersistenceUnit in error: EMPTY STRING unitName but ther
      e is no deployments in scope
      at org.jboss.ejb3.injection.PersistenceContextHandler.loadFieldDependenc
      ies(PersistenceContextHandler.java:361)
      at org.jboss.ejb3.injection.PersistenceContextHandler.loadDependencies(P
      ersistenceContextHandler.java:413)
      at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:239)
      at org.jboss.ejb3.SessionContainer.processMetadata(SessionContainer.java
      :77)
      at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deploym
      ent.java:406)
      at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:457)
      at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:974)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy25.start(Unknown Source)
      at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:365)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:334)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:522)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:207)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:218)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:197)
      15:12:33,843 INFO [EJB3Deployer] Deployed: file:/C:/programas/jboss-4.0.4RC1/se
      rver/all/deploy/Stock.ejb3
      15:12:33,859 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.j2ee:service=EJB3,module=Stock.ejb3
      State: FAILED
      Reason: java.lang.RuntimeException: Field private javax.persistence.EntityMana
      ger beans.StockListBean._manager @PersistenceUnit in error: EMPTY STRING unitNam
      e but there is no deployments in scope

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.j2ee:service=EJB3,module=Stock.ejb3
      State: FAILED
      Reason: java.lang.RuntimeException: Field private javax.persistence.EntityMana
      ger beans.StockListBean._manager @PersistenceUnit in error: EMPTY STRING unitNam
      e but there is no deployments in scope


      I've been doing again and again, i read that jboss-4.0.4RC1 has already the EJB3 bundle but i don't know how to resolve this, could you help me please, i haven't find something about this error in the internet.