1 Reply Latest reply on Apr 30, 2003 3:40 PM by Paul Morris

    Accessing EJB on second JBoss server

    Paul Morris Newbie

      I have 2 JBoss servers running the same application. When I update a bean on one, I do a jndi lookup for the matching bean on on the second server, so I can update it's matching bean.

      The jndi lookup is failing for reasons I don't understand. While in the first bean I create a new InitialContext for the second server. It's JNDI properties are the same as the first server except for the provider url. When I do a lookup on the home interface I get the following message.

      Any help would be appreciated. (BTW, I have a client that can successfully interact with both servers simultaneously. That is, the jndi lookup succeeds when done from a remote client, but not from one jboss app to it's mirror app).

      2003-04-30 14:16:44,479 DEBUG [com.flashpoint.config.ConfigServiceFactory] getInstance()
      2003-04-30 14:16:44,479 DEBUG [com.flashpoint.ejb.util.ServerContext] ServerContext() env = {java.naming.provider.url=jnp://braindead:1099, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, jnp.timeout=0, jnp.socketFactory=org.jnp.interfaces.TimedSocketFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces, jnp.sotimeout=0}
      2003-04-30 14:16:44,480 DEBUG [com.flashpoint.ejb.util.ServerContext] env = {jnp.sotimeout=0, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interfaces, jnp.timeout=0, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, jnp.socketFactory=org.jnp.interfaces.TimedSocketFactory, java.naming.provider.url=braindead:1099}
      2003-04-30 14:16:44,480 DEBUG [com.flashpoint.ejb.user.UserCatalogSessionEjb] csContext.env = {jnp.sotimeout=0, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interfaces, jnp.timeout=0, java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, jnp.socketFactory=org.jnp.interfaces.TimedSocketFactory, java.naming.provider.url=braindead:1099}
      2003-04-30 14:16:44,480 DEBUG [com.flashpoint.ejb.util.ServerContext] doing lookup for qurio/UserEntity
      2003-04-30 14:16:44,517 DEBUG [com.flashpoint.ejb.user.UserCatalogSessionEjb] ejbRemove()
      2003-04-30 14:16:44,518 ERROR [org.jboss.ejb.plugins.LogInterceptor] Unexpected Error:
      java.lang.NoSuchMethodError: create
      at $Proxy733.(Unknown Source)
      at sun.reflect.GeneratedSerializationConstructorAccessor1224.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
      at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:759)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1621)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
      at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
      at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:30)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:506)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:463)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at com.flashpoint.ejb.util.ServerContext.lookup(ServerContext.java:1149)
      at com.flashpoint.ejb.util.ServerContext.lookupItemEntityHome(ServerContext.java:1174)
      at com.flashpoint.ejb.util.ServerContext.getItemEntityHome(ServerContext.java:734)
      at com.flashpoint.ejb.user.UserCatalogSessionEjb.registerPeer(UserCatalogSessionEjb.java:158)
      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:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:237)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:738)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:383)
      at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)