(Sorry long post but I�m trying to solve this problem for more than a week now).pls help. Hi, Im running the examples of Enterprise Java Beans from Monson-Haefel book in WebLogic 6.0 and I?m havin the error: java.rmi.RemoteException: EJB Exception: ; nested exception is: java.lang.NoClassDefFoundError: com.titan.cabin.CabinHome java.lang.NoClassDefFoundError: com.titan.cabin.CabinHome I was debuggin it and I discovered tha the error occurs right after I get a remote reference to the bean with Object ref = ctx.lookup("java:comp/env/ejb/Cabin"); I got the reference but then when I try to do: CabinHome home = (CabinHome)(javax.rmi.PortableRemoteObject.narrow(ref, CabinHome.class)); the error occurs.
Here goes a fragment of code showing the reference I recovered: Object ref = ctx.lookup("java:comp/env/ejb/Cabin"); // this next line prints: com.titan.cabin.CabinEJBHomeImpl_WLStub System.out.println(ref.getClass().toString()); here goes a fragment of my ejb-jar.xml: <session> <description>stateless ejb que manuseia Cabin ejb</description> <ejb-name>TravelAgent</ejb-name> <home>com.titan.travelagent.TravelAgentHome</home> <remote>com.titan.travelagent.TravelAgent</remote> <ejb-class>com.titan.travelagent.TravelAgentEJB</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> <ejb-ref> <ejb-ref-name>ejb/Cabin</ejb-ref-name> <ejb-ref-type>Entity</ejb-ref-type> <home>com.titan.cabin.CabinHome</home> <remote>com.titan.cabin.Cabin</remote> </ejb-ref> </session>
and a fragment of weblogic-ejb-jar.xml: <ejb-reference-description> <ejb-ref-name>ejb/Cabin</ejb-ref-name> <jndi-name>Cabin</jndi-name> </ejb-reference-description>
Any help will be wellcome. txs in advance. PS - If I set the classpath to C:\bea\wlserver6.0\config\mydomain\applications\Cabin.jar it works but I�m sure thats not the wright thing to do.
[This message has been edited by Marcos Maia (edited July 17, 2001).]
You're on the right track - your problem was definitely lack of CLASSPATH access to the Home Interface, so giving your client an explicit path helped. One thing about WLS 6 that I'm not sure of however, is that in certain cases it's supposed to be able to download classes from the server. You might want to ask in the BEA EJB forum about that. Still, at a minimum, you'd need the definitions to compile, and the WLS stubs to run the client, so might as well include the whole jar anyway.
Blitzlügen - Lies or information broadcast, but when called out the broadcaster does little or nothing is done to correct them, thus allowing those who wish to believe to accept them as truth.
Lügensturm - A barrage of Blitzlügen fired in such quick succession that it is essentially impossible to correct them all.
Tanks for the reply Tim. Wath is driving me mad is that the problem occurs when I try to reference the Cabin EJB from the TravelAgent EJB and not from the client. The client accesses the TravelAgent EJB wich then accesses the Cabin entity EJB and there is where the home interface of the Cabin EJB is not found, I�m really confused about it.
You didn't tell me he was so big. Unlike this tiny ad: