EMPTY STRING unitName but there is no deployments in scope
cesarizurieta Feb 9, 2006 10:11 AMHi I'm having the following problem: I have an ear with a ejb3 jar inside. I have a stateless session bean that is using @PersistenceContext. I upgraded to jboss-4.0.4RC1 that I believe is using EJB3 RC5 and I'm having this error when deploying:
09:51:21,645 WARN [ServiceController] Ignoring request to stop nonexistent service: jboss.j2ee:service=EJB3,ear=sinapsis-ear-1.0.ear,jar=nucleo-par-1.0.par,name=ManejoHistoricoAccion 09:51:21,645 WARN [ServiceController] Ignoring request to destroy nonexistent service: jboss.j2ee:service=EJB3,ear=sinapsis-ear-1.0.ear,jar=nucleo-par-1.0.par,name=ManejoHistoricoAccion 09:51:21,645 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB3,module=nucleo-par-1.0.par java.lang.RuntimeException: Field private javax.persistence.EntityManager com.intellicortex.persistencia.historico.ManejoHistoricoAccion.em @PersistenceUnit in error: EMPTY STRING unitName but there is no deployments in scope at org.jboss.ejb3.injection.PersistenceContextHandler.loadFieldDependencies(PersistenceContextHandler.java:361) at org.jboss.ejb3.injection.PersistenceContextHandler.loadDependencies(PersistenceContextHandler.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(Ejb3Deployment.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(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source) ...
Using the following persistence.xml in the META-INF directory of the ear:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <persistence-unit name="intellicortex"> <description>IntelliCortex Persistence</description> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/intellicortexDatasource</jta-data-source> <jar-file>nucleo-ejb3-1.0.ejb3</jar-file> <jar-file>nucleo-par-1.0.par</jar-file> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" /> <property name="hibernate.show_sql" value="true" /> <property name="hibernate.hbm2ddl.auto" value="update" /> </properties> </persistence-unit> </persistence>
Any clues on why is this happening?