Where´re my ejb´s at JBoss AS 7.1.1?
stateri Jan 29, 2015 11:37 AMHi,
I deployed my ear package at JBoss 7.1.1 and now my app isn´t working anymore because I think that the JNDI addresses are different from JBoss 4 (where I was using the ear package). It´s a migration from JBoss 4 and I have recompiled entire system.
I start JBoss using this line:
./standalone.sh --server-config=standalone-full.xml -Djboss.server.base.dir=/usr/local/desenv/sergio.junior/jboss-as-7.1.1.Final-test-logos/standalone
and JBoss starts without any error. JBoss is showing me my ejb´s too, like this:
11:52:19,470 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-27) JNDI bindings for session bean named EstruturaProcesso in deployment unit subdeployment "logos-model-2.0.16-SNAPSHOT.jar" of deployment "logos.ear" are as follows:
java:global/logos/logos-model-2.0.16-SNAPSHOT/EstruturaProcesso!metodista.backbusiness.estruturaprocesso.bean.EstruturaProcesso
java:app/logos-model-2.0.16-SNAPSHOT/EstruturaProcesso!metodista.backbusiness.estruturaprocesso.bean.EstruturaProcesso
java:module/EstruturaProcesso!metodista.backbusiness.estruturaprocesso.bean.EstruturaProcesso
java:jboss/exported/logos/logos-model-2.0.16-SNAPSHOT/EstruturaProcesso!metodista.backbusiness.estruturaprocesso.bean.EstruturaProcesso
java:global/logos/logos-model-2.0.16-SNAPSHOT/EstruturaProcesso
java:app/logos-model-2.0.16-SNAPSHOT/EstruturaProcesso
java:module/EstruturaProcesso
11:52:19,472 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-27) JNDI bindings for session bean named Service in deployment unit subdeployment "logos-model-2.0.16-SNAPSHOT.jar" of deployment "logos.ear" are as follows:
java:global/logos/logos-model-2.0.16-SNAPSHOT/Service!metodista.service.bean.Service
java:app/logos-model-2.0.16-SNAPSHOT/Service!metodista.service.bean.Service
java:module/Service!metodista.service.bean.Service
java:jboss/exported/logos/logos-model-2.0.16-SNAPSHOT/Service!metodista.service.bean.Service
java:global/logos/logos-model-2.0.16-SNAPSHOT/Service
java:app/logos-model-2.0.16-SNAPSHOT/Service
java:module/Service
Then to make a test I´m trying to execute this simple code:
Hashtable props = new Hashtable();
props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
Context context = new javax.naming.InitialContext(props);
context.lookup("java:app/logos-model-2.0.16-SNAPSHOT/Service!metodista.service.bean.Service");
But when I execute this code, the following error is reported: Method Invocation context.lookup
What´re the JNDI addresses of my EJB´s at JBoss 7.1.1?
Thanks in advance,
Sergio Stateri Junior