• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JBoss, EJB problem

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i deployed a stateless bean (simple HelloWorld) in jboss, and checked the jboss console to confirm that the bean was properly deployed. i tried calling the bean from a simple java client. while compiling the client, i get compiler error: "cannot resolve symbol, symbol : class HelloWorldHome" where 'HelloWorldHome' is the name of the home interface. is there any problem with the JNDI lookup of the home interface. I am new to EJB and jboss. Please help.
Thanks,
Aju
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have to put the EJB client jar in your classpath of course.
 
Aju Josep
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks BillyBob, but i have read that ejb-client-jars are optional. can u please elaborete more on ejb-client jars and why u need them, and what all things constiture an ejb-client jar. this may sound stupid, but i am very new to ejb.
 
Billybob Marshall
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All I'm basically saying is that since as you said, you're trying to reference a 'HelloWorldHome' class/interface in your client code, so of course you would have to have a jar (or loose class) containing HelloWorldHome.class in it, and in the correct folder hierarchy according to its package statement. When you built the EJB, part of that process should have created a client JAR. That's the one your client code needs to stick in its classpath.
 
Aju Josep
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yeah, i did that and now i no more get that compiler error. i got u'r point. thanx Billybob. but now i have a new problem when i try to run the client application. i get this following error:
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
can u help ?
Thanks, Aju.
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try keeping the foll. jar in your class path, so that ur client application can pick it up...
 
Aju Josep
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
bingo !!! hey vish, that worked. that was a great tip. u helped me run my first ever EJB. thanx a lot. thanx a lot to u too Billybob....
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am also a novice to JBoss. There are a whole lot of jar files in the JbossDir\client directory. Based on the need, we may have to supply the jar files as required to run the client programs accessing J2EE services on JBoss Server.I am not sure if these jar files are explained in the JBoss documentation...
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the JBoss forum...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic