JBoss 3.2.7, IBM JDK 1.5, EJB to EJB call issue

Discussions

EJB design: JBoss 3.2.7, IBM JDK 1.5, EJB to EJB call issue

  1. JBoss 3.2.7, IBM JDK 1.5, EJB to EJB call issue (4 messages)

    Hi I have two simple EJBS SimpleA and SimpleB and am looking up SimpleB from SimpleA to fire a method but JBoss throwing an ERROR attached below. The Dynamic Proxy is not found. Any Idea friends Snippet of SimpleA EJB -------------------------------------------------------- public void ejbCreate() { try { InitialContext ctx = new InitialContext(); Object obj = ctx.lookup("java:comp/env/ejb/simpleB"); //Code does not reach here error occurs right above line SimpleBHome simpleBHome = (SimpleBHome)PortableRemoteObject.narrow(obj,SimpleBHome.class); simpleB = simpleBHome.create(); System.out.println("Object Created successfully"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } Statck trace ########################################################### 17:57:59,762 ERROR [LogInterceptor] Unexpected Error in method: public abstract void test.SimpleA.callB() throws java.rmi.RemoteException java.lang.NoClassDefFoundError: $Proxy106 at sun.reflect.GeneratedSerializationConstructorAccessor82.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Constructor.java:521) at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:951) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1314) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:354) at java.rmi.MarshalledObject.get(MarshalledObject.java:163) at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:51) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:633) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:568) at javax.naming.InitialContext.lookup(InitialContext.java:363) at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1041) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:697) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:568) at javax.naming.InitialContext.lookup(InitialContext.java:363) at test.SimpleABean.ejbCreate(SimpleABean.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.jboss.ejb.StatelessSessionEnterpriseContext.(StatelessSessionEnterpriseContext.java:52) at org.jboss.ejb.plugins.StatelessSessionInstancePool.create(StatelessSessionInstancePool.java:35) at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:168) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:58) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:317) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:150) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331) at org.jboss.ejb.Container.invoke(Container.java:709) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54) at org.jboss.mx.server.Invocation.invoke(Invocation.java:82) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:198) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360) at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:309) at sun.rmi.transport.Transport$1.run(Transport.java:168) at java.security.AccessController.doPrivileged(AccessController.java:274) at sun.rmi.transport.Transport.serviceCall(Transport.java:164) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:506) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.handleRequest(TCPTransport.java:838) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:912) at java.lang.Thread.run(Thread.java:797)
  2. Check jmx-console what you ejb name is. It might have been named differently than what you expect. Make sure you configure jboss.xml file properly then.
  3. Well! Things to check! 1: You don't need to narrow down the class if both the beans are accessing each other locally. 2: Check the jndi names of all the beans exported. 3: Get the initialContext for java:comp/env and call ctx.list("/"), it must show all the names bound to java:comp/env environment. 4: Be happy and feel good cheers, http://www.javaicillusion.blogspot.com/
  4. Thanks for the ideas[ Go to top ]

    The problem is at little higher level than it looks. Everything runs perfectly fine with SUN JDK 1.4/1.5 and even with IBM jdk 1.4 . It is the IBM jdk 1.5 which is causing this damn problem, dont know who advised IBM to write their own JDK and sell it to my client Biswaranjan Das dasexpress at hotmail dot com SCEA,SCBCD,SCWCD,SCJP
  5. http://jira.jboss.com/jira/browse/JBAS-3691