(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).]