[jboss-user] [Clustering/JBoss] - Cannot lookup EJBs in clustered environment

skymic do-not-reply at jboss.com
Tue May 22 09:00:08 EDT 2007


Hi,

I am using JBoss 4.0.5 with EJB3.0 and cluster profile.

I have packed my application in an SDOCIBusinessApp.ear file and deploy this file by copying it in the farm directory of my server.
According to server.log the deployment was OK. I cannot see any errors.

My application consists of a WS_Server.war and a SDOCIBusinessLogic.jar (contains EJBs). Theys are both packed in the SDOCIBusinessApp.ear.
When I test my application a lookup is done from the WS_Server app.
This lookup fails with the error:

Caused by: javax.naming.NameNotFoundException: SDOCIBusinessApp not bound
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
        at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
        at org.jboss.ha.jndi.TreeHead.lookupLocally(TreeHead.java:296)
        at org.jboss.ha.jndi.TreeHead.lookup(TreeHead.java:215)
        at org.jboss.ha.jndi.HAJNDI.lookup(HAJNDI.java:155)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:258)
        at $Proxy125.lookup(Unknown Source)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        ... 47 more

When I check the deployment of the EJBs in jmx-console, I cannot see the stateful session bean (remote) which I am trying to lookup. So the error message is not surprising.

Here is the list of the jndiView from jmx-console:

Web Applications
java:comp namespace of the juddi-service.sar/juddiws.war application:
  +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
  +- ORB (class: org.jacorb.orb.ORB)
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- jdbc (class: org.jnp.interfaces.NamingContext)
  |   |   +- juddiDB[link -> java:/DefaultDS] (class: javax.naming.LinkRef)
  |   +- security (class: org.jnp.interfaces.NamingContext)
  |   |   +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
  |   |   +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)

java:comp namespace of the jmx-console.war application:
  +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
  +- ORB (class: org.jacorb.orb.ORB)
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- security (class: org.jnp.interfaces.NamingContext)
  |   |   +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
  |   |   +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
  |   |   +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
  |   |   +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)

java:comp namespace of the jbossweb-tomcat55.sar/root.war application:
  +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
  +- ORB (class: org.jacorb.orb.ORB)
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- security (class: org.jnp.interfaces.NamingContext)
  |   |   +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
  |   |   +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)

java:comp namespace of the SDOCI.war application:
  +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
  +- ORB (class: org.jacorb.orb.ORB)
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- security (class: org.jnp.interfaces.NamingContext)
  |   |   +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
  |   |   +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)

java:comp namespace of the SDOCIBusinessApp.ear/WS_Server.war application:
  +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
  +- ORB (class: org.jacorb.orb.ORB)
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- security (class: org.jnp.interfaces.NamingContext)
  |   |   +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
  |   |   +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)

java:comp namespace of the console-mgr.sar/web-console.war application:
  +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
  +- ORB (class: org.jacorb.orb.ORB)
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- security (class: org.jnp.interfaces.NamingContext)
  |   |   +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
  |   |   +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)

java:comp namespace of the jbossws14.sar/jbossws-context.war application:
  +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
  +- ORB (class: org.jacorb.orb.ORB)
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- security (class: org.jnp.interfaces.NamingContext)
  |   |   +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
  |   |   +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
  |   |   +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)

java:comp namespace of the httpha-invoker.sar/invoker.war application:
  +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
  +- ORB (class: org.jacorb.orb.ORB)
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- security (class: org.jnp.interfaces.NamingContext)
  |   |   +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
  |   |   +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
  |   |   +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
  |   |   +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)

java: Namespace
  +- DefaultDS (class: javax.sql.DataSource)
  +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
  +- idmDS (class: javax.sql.DataSource)
  +- JBossCorbaORB (class: org.omg.CORBA.ORB)
  +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
  +- comp (class: javax.naming.Context)
  +- JBossCorbaPOA (class: org.omg.PortableServer.POA)
  +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
  +- jaas (class: javax.naming.Context)
  |   +- other (class: org.jboss.security.plugins.SecurityDomainContext)
  |   +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
  |   +- jmx-console (class: org.jboss.security.plugins.SecurityDomainContext)
  |   +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
  +- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
  +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
  +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
  +- Mail (class: javax.mail.Session)
  +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
  +- JBossCorbaNaming (class: org.omg.CosNaming.NamingContextExt)
  +- TransactionManager (class: org.jboss.tm.TxManager)
  +- JBossCorbaInterfaceRepositoryPOA (class: org.omg.PortableServer.POA)

Global JNDI Namespace
  +- UserTransactionSessionFactory (proxy: $Proxy12 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
  +- console (class: org.jnp.interfaces.NamingContext)
  |   +- PluginManager (proxy: $Proxy51 implements interface org.jboss.console.manager.PluginManagerMBean)
  +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
  +- HAPartition (class: org.jnp.interfaces.NamingContext)
  |   +- DefaultPartition (class: org.jboss.ha.framework.server.HAPartitionImpl)
  +- HASessionState (class: org.jnp.interfaces.NamingContext)
  |   +- Default (class: org.jboss.ha.hasessionstate.server.HASessionStateImpl)
  +- JAXR (class: org.apache.ws.scout.registry.ConnectionFactoryImpl)
  +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
  +- invokers (class: org.jnp.interfaces.NamingContext)
  |   +- zhISAta1 (class: org.jnp.interfaces.NamingContext)
  |   |   +- iiop (class: org.jboss.invocation.iiop.IIOPInvoker)
  +- jmx (class: org.jnp.interfaces.NamingContext)
  |   +- invoker (class: org.jnp.interfaces.NamingContext)
  |   |   +- RMIAdaptor (proxy: $Proxy50 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
  |   +- rmi (class: org.jnp.interfaces.NamingContext)
  |   |   +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
  +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)

HA-JNDI Namespace

I expected to see my EJBs either in Global JNDI Namespace or HA-JNDI Namespace but they are not there.

As I said the deployment did not leave any errors in server.log.

Can anyone help?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047566#4047566

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047566



More information about the jboss-user mailing list