Hi,
Getting the following 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"
When i create InitialContext Object in My Bean class...I tried creating the context object with no argument and with argument constructors... I'm using weblogic7.0...
--Thanks\suresh
-
Unable to create InitialContext Object in My Bean class... (1 messages)
- Posted by: suresh muraki
- Posted on: July 02 2003 11:12 EDT
Threaded Messages (1)
- Unable to create InitialContext Object in My Bean class... by Thandaveswaran Venkatraman on July 07 2003 03:25 EDT
-
Unable to create InitialContext Object in My Bean class...[ Go to top ]
- Posted by: Thandaveswaran Venkatraman
- Posted on: July 07 2003 03:25 EDT
- in response to suresh muraki
Hi,
I make an assumption that the client which you are using to execute the bean is an external client. Incase of external clients you need to provide the properties to get the initial context as a parameter while getting the InitialContext.
I also feel that ur getting the InitialContext in this way
Context context = new InitialContext();
where as u have to try using
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL, "t3://<server ip address>:7001");
Context context = new InitialContext(properties);
Hope it works.
Bye