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

Posted By:   sundar_manyapu
Posted On:   Tuesday, August 13, 2002 08:33 AM

HI Friends, I am getting the following exception when i try to compile and run the example you have given in the article JNDI overview, Part 1: An introduction to naming services (http://www.javaworld.com/javaworld/jw-01-2000/jw-01-howto_p.html) It was compiling correctly. How can i solve this problem? Where can i get com.sun.jndi.fscontext.RefFSContextFactory class file. The problem is because the above class is not availabe. The exception that is noticed is: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.f scontext.RefFSContextFactory. Root exception is java.lang.ClassNotFoundExceptio n: com.sun.jndi.fscontex   More>>

HI Friends,



I am getting the following exception when i try to compile and run the example you have given in the article
JNDI overview, Part 1: An introduction to naming services

(http://www.javaworld.com/javaworld/jw-01-2000/jw-01-howto_p.html)


It was compiling correctly. How can i solve this problem? Where can i get com.sun.jndi.fscontext.RefFSContextFactory class file. The problem is because the above class is not availabe.




The exception that is noticed is:


javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.f
scontext.RefFSContextFactory. Root exception is java.lang.ClassNotFoundExceptio
n: com.sun.jndi.fscontext.RefFSContextFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext. (Unknown Source)
at Main.main(Main.java:20)


Regards,

Sundar

   <<Less

Re: javax.naming.NoInitialContextException

Posted By:   Jay_Jacobson  
Posted On:   Sunday, September 8, 2002 04:07 PM

I ran into the same problem and found the answer elsewhere on JGuru.



The problem is that there is an additional download that is necessary. Right now, the file is "fscontext-1_2-beta3.zip" for the com.sun.jndi.fscontext.RefFSContextFactory implementation.



Go to http://java.sun.com/products/jndi and look for "Download JNDI 1.2.1 & More".



Regards,

Jay
About | Sitemap | Contact