[jboss-dev-forums] [JBoss AS7 Development] - Services with missing/unavailable dependencies EntityManager
Raphael Ferreira
do-not-reply at jboss.com
Wed Aug 3 14:30:51 EDT 2011
Raphael Ferreira [http://community.jboss.org/people/raphael_pf] created the discussion
"Services with missing/unavailable dependencies EntityManager"
To view the discussion, visit: http://community.jboss.org/message/619237#619237
--------------------------------------------------------------
Hello, we have an application running on glassfish jee6 and want to migrate to jboss7. The application is a war and uses two persistence to access two separate base.
The persistence:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="siscoex-persistence-unit">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/siscoex</jta-data-source>
<jar-file>lib/siscoex-core-0.3.0-SNAPSHOT.jar</jar-file>-->
<jar-file>lib/seta-jee-core-0.0.2.jar</jar-file>
<properties>
<property name="hibernate.default_schema" value="siscoex" />
<property name="hibernate.ejb.use_class_enhancer" value="true" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.bytecode.provider" value="javassist" />
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
<property name="LC_MESSAGES" value="en_us" />
<!-- <property name="hibernate.hbm2ddl.auto" value="update" /> -->
</properties>
</persistence-unit>
<persistence-unit name="seta-persistence-unit">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/seta_jee</jta-data-source>
<jar-file>lib/seta-jee-core-0.0.2.jar</jar-file>
<properties>
<property name="hibernate.default_schema" value="seta" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
<property name="LC_MESSAGES" value="en_us" />
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
<property name = "hibernate.query.factory_class" value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory"/>
<property name="hibernate.archive.autodetection" value="class"/>
</properties>
</persistence-unit>
</persistence>
The EJB:
@Stateless
public class PaisManagerBean implements PaisManager {
@PersistenceContext(unitName = "seta-persistence-unit")
private EntityManager ems;
@Override
public Pais buscarPorCodigoSiscomex(Integer codigoSiscomex) {
try {
return ems.createQuery("from Pais where codigoSiscomex = :c", Pais.class).setParameter("c", codigoSiscomex)
.getSingleResult();
} catch (NoResultException e) {
return null;
}
}
}
**
The Error:
Can anyone give any clues?
thk regards,
Raphael
10:14:44,929 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" =>
{"Operation step-2" => {"Services with missing/unavailable dependencies" =>
["jboss.deployment.unit.\"siscoex-internet.war\".component.PaisManagerBean.START missing
[ jboss.naming.context.java.module.siscoex-internet.siscoex-internet.\"env/br.gov.ce.sefaz.seta.jee.core.manager.bean.PaisManagerBean/ems\" ]",
"jboss.deployment.unit.\"siscoex-internet.war\".jndiDependencyService missing
[ jboss.naming.context.java.module.siscoex-internet.siscoex-internet.\"env/br.gov.ce.sefaz.seta.jee.core.manager.bean.UnidadeFederacaoManagerBean/ems\",
jboss.naming.context.java.module.siscoex-internet.siscoex-internet.\"env/br.gov.ce.sefaz.seta.jee.core.manager.bean.PaisManagerBean/ems\" ]",
"jboss.deployment.unit.\"siscoex-internet.war\".component.UnidadeFederacaoManagerBean.START missing
[ jboss.naming.context.java.module.siscoex-internet.siscoex-internet.\"env/br.gov.ce.sefaz.seta.jee.core.manager.bean.UnidadeFederacaoManagerBean/ems\" ]"]}}}
The Datasource:
<datasource jndi-name="jdbc/siscoex" pool-name="siscoex_pool_Pool" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:postgresql://localhost:5432/siscoex
</connection-url>
<driver>
postgresql-8.4-701.jdbc4.jar
</driver>
<security>
<user-name>
postgres
</user-name>
<password>
postgres
</password>
</security>
</datasource>
<datasource jndi-name="jdbc/seta_jee" pool-name="seta_jee_pool_Pool" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:postgresql://localhost:5432/siscoex
</connection-url>
<driver>
postgresql-8.4-701.jdbc4.jar
</driver>
<security>
<user-name>
postgres
</user-name>
<password>
postgres
</password>
</security>
</datasource>
#####
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/619237#619237]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110803/df450fe1/attachment.html
More information about the jboss-dev-forums
mailing list