• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Can�t find home interface

 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(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).]
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I�m really lost here may someone at least give me some suggestion.
Txs a lot.
 
Saloon Keeper
Posts: 26290
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic