• Post Reply Bookmark Topic Watch Topic
  • New Topic

JNDI Problem

 
Dheeraj Thakur
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've created an application using Entity Bean and have deployed it successfully using Inprise AppServer 4.0 but when I am calling this bean from my client program/servlet I get an exception which says...
javax.naming.NoInitialContextException: Need to specify class name in environment or system property: java.naming.factory.initial
and says it is something to do with the naming lookup (JNDI).
I tried to run the same application on another machine and it works fine there.
Can anyone tell me what setting needs to be done in the first machine to set this right.

------------------
Thanx,
Dheeraj
 
Preethi Chaloori
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi!
See if this helps
Establish the JNDI initial Context.
Locate the Home interface of the Enterprise JavaBean using JNDI.
Use the Home interface instruct the Container to create an instance of the Enterprise JavaBean.
Preethi

Originally posted by Dheeraj Thakur:
I've created an application using Entity Bean and have deployed it successfully using Inprise AppServer 4.0 but when I am calling this bean from my client program/servlet I get an exception which says...
javax.naming.NoInitialContextException: Need to specify class name in environment or system property: java.naming.factory.initial
and says it is something to do with the naming lookup (JNDI).
I tried to run the same application on another machine and it works fine there.
Can anyone tell me what setting needs to be done in the first machine to set this right.

 
Dheeraj Thakur
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found out the solution to this problem. It was the classpath settings and I have sorted it out.
Thanks for ur reply.
Dheeraj
Originally posted by Preethi Chaloori:
Hi!
See if this helps
Establish the JNDI initial Context.
Locate the Home interface of the Enterprise JavaBean using JNDI.
Use the Home interface instruct the Container to create an instance of the Enterprise JavaBean.
Preethi

 
Nitin Gulati
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am also facing the same problem. If you could please elaborate on how u solved the problem it will be of great help.
Thanks
Nitin Gulati
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nitin Gulati:
Hi,
I am also facing the same problem. If you could please elaborate on how u solved the problem it will be of great help.
Thanks
Nitin Gulati

1. What Application Server are you using?
2. Post the code that you are using to lookup the EJB.
 
Sachin Joshi
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dheeraj Thakur:
I found out the solution to this problem. It was the classpath settings and I have sorted it out.
Thanks for ur reply.
Dheeraj


hi dhheraj
I am facing same problem. What exactly was missing in your classpath ?
Can you tell us what changes u made to ur classpath ?
thanks
sachin
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!