dcsimg
namingexception caught when trying to instantiate InitialContect
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, January 21, 2003 02:05 AM


Hi,

I am having problems running a program to lookup a directory or file using JNDI on windows 2000.

I set the INITIAL_CONTEXT_FACTORY to com.sun.jndi.fscontext.RefFSContextFactory, and 'put' this into an env hashtable. But when the following line of code is run

InitialContext context = new InitialContext(env)

the NamingException error is caught.

I am using jsdk1.4.1_01 with j2sdkee1.3.3.

Can anyone help me with this?

Thanks

Re: namingexception caught when trying to instantiate InitialContect

Posted By:   Anonymous  
Posted On:   Tuesday, February 4, 2003 05:59 AM

Hi Mary,

I had this kind of problem. Check if you have in your classpath these jar's : "fscontext.jar" and "providerutil.jar". They are specialized to manage a JNDI FileSystems provider. The file "fscontext.jar" contains the class "com.sun.jndi.fscontext.RefFSContextFactory".
If you don't have these files (probably) you can download them at this URL : http://java.sun.com/products/jndi/serviceproviders.html.
The JDK only includes 3 service providers : LDAP, CORBA and RMI.
Hope to help you
Jean-michel Kinder
About | Sitemap | Contact