You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rudi Doku <ru...@hotmail.com> on 2001/12/28 04:11:58 UTC
Newbie, JSQLConnectionPool Error - Help Required
Hello,
I am evaluating the j-netdirect sql connection pool driver JSQLConnectionPool.
I installed the package and successfully run the ExampleConnectionPool program.
I have copied some to Create a JNDI context and bind it in the naming service, however the following exception is thrown whenever the execution reaches the following line : ctx = new InitialContext(env);
The exception thrown is :
Error:init JNDI javax.naming.NoInitialContextException:
Cannot instantiate class: com.sun.jndi.fscontext.RefFSContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.fscontext.RefFSContextFactory]
I'm not quite sure why this is happening since the Classpath has the following entry - C:\jdk1.3\lib\fscontext.jar;.
Below is the exact implementation of the method :
private void initJNDI() {
/* Create the file store first time - the file store holds the JNDI entries */
File root = new File(sFileStore);
if (!root.exists())
root.mkdir();
/* Initialize JNDI - tell it to use the File Store provider */
Hashtable env = new Hashtable(100);
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
env.put(Context.PROVIDER_URL, "file:"+sFileStore+"/");
//env.put(Context.PROVIDER_URL, "file:about.txt/");
/* Create a JNDI context and bind it in the naming service */
try {
ctx = new InitialContext(env);
}
catch (javax.naming.NamingException e) {
error("init JNDI ", e);
}
}
Any help would be very much appreciated.
Thanks,
RudiGet more from the Web. FREE MSN Explorer download : http://explorer.msn.com