javax.naming.NoInitialContextException in JDeveloper10g
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ramkumar_R
Posted On:   Monday, January 23, 2006 01:49 AM

Hi everyone, I'm new to ejb. When I try to run my sample ejb application I'm getting the following runtime exception. I think this is because of non availability of naming.jar file. I don't know how to rectify this problem. could anyone please tell me the way to overcome this?......... exception: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)    More>>



Hi everyone,


I'm new to ejb. When I try to run my sample ejb application I'm getting the following runtime exception. I think this is because of non availability of naming.jar file. I don't know how to rectify this problem. could anyone please tell me the way to overcome this?.........




exception:




javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial


at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)


at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)


at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)


at javax.naming.InitialContext.lookup(InitialContext.java:347)


at model.SessionEJBClient.main(SessionEJBClient.java:17)


Process exited with exit code 0.

   <<Less

Re: javax.naming.NoInitialContextException in JDeveloper10g

Posted By:   ankush_purwar  
Posted On:   Monday, January 23, 2006 07:35 PM

you have to pass some properties to initial context.
Properties p = new Properties();
You have to put some information in this properties.
see the constants defined by Context class in java
like provider_url, initialfactory etc..
And pass the same propery to initial context
Context ctx = new InitialContext(p)
About | Sitemap | Contact