• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNDI

 
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I keep getting this Exception

Exception Caught: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.fscontext.RefFSContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.fscontext.RefFSContextFactory]

Which means "the classpath for the JNDI program does not contain the JNDI server classes:"

I don't understand what they mean by "JNDI server classes".

I had included j2ee.jar from J2EE RI in classpath.

I followed this tutorial
http://www.developer.com/java/ent/article.php/10933_2215571_4.

Kindly help me with this.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This page makes it sound as if the file system context implementation that you are trying to use is not part of the JNDI that comes with J2SE/J2EE. Follow the "Download JNDI 1.2.1 & More" link to get to a page where you can download it separately.
[ January 04, 2006: Message edited by: Ulf Dittmer ]
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the link and the explanation Ulf Dittmer. That was really helpful.

I got one doubt with the classpath for fscontext.jar file.

I had never included

C:\jdk\lib\tools.jar;
C:\jdk\jre\lib\rt.jar;

These two jar in my classpath. JRE just picks them up.

As per the instruction in the link which you gave me I downloaded the fscontext.zip file and placed fscontext.jar and providerutil.jar in

C:\jdk\jre\lib\ext folder.

Why JRE is NOT picking these jar files?
Only after including these jar files in my classpath, the program is executing with out the previously stated error.
 
reply
    Bookmark Topic Watch Topic
  • New Topic