Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Head First EJB question

 
Anu Pardeshi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to EJB.
Even after following the steps suggested by Kathy for common CORBA.BAD_OPERATION error, I am still getting javax.naming.NoInitialContextException.
Any help will be appreciated.
 
Chris Lewold
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please provide a short code listing.
Regards,
Chris Lewold
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd guess that you are missing something from your classpath. In your code you've probably got something like:
Context ctx=new InitialContext();
Object obj=ctx.lookup("Advisor");
and you are failing on the lookup. The problem I'm suspecting is that you never really established a connection to the JNDI service of the EJB container.
 
Anu Pardeshi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you are right.
As I said, I am new to EJB and started EJB only a week ago.
I have followed all the instructions from "Head First EJB" book.
I was able to install J2EE, use deploytool and deploy the application.
Do I have to install something other than J2SE SDK 1.3.1, J2EE 1.3, RI?
I have set the following environment variables:
PATH ${PATH};c:\j2sdkee1.3.1\bin
CLASSPATH ${J2EE_HOME}\lib\j2ee.jar
JAVA_HOME C:\jdk1.3.1
J2EE_HOME C:\j2sdkee1.3.1
Thanks for your help.
 
Anu Pardeshi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got the solution to my problem in deja.com.
Thanks,
Anu
 
Mark Wuest
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Anu Pardeshi,

Bad Form!

Perhaps you could tell us the solution you found.

Thanks,

Mark

PS: The answer you got was here, FWIW:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=c3cdbj%24c4o%241%40hood.uits.indiana.edu

PPS: I do agree with the sentiment about the book, and I hope the authors (I believe they read here) aren't offended if I add that I, too, expected an intro app with comments like "Just go with it for now." would Just Work (TM).
[ June 12, 2004: Message edited by: Mark Wuest ]
 
Michael Chua
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a small question
what if I want to run the client in another computer
what changes should I do?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic