Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

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: 23426
159
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.
 
A wop bop a lu bop a womp bam boom! Tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic