Hello,
I am evaluating the j-netdirect sql connection pool driver
JSQLConnectionPool.
I installed the package and successfully run the ExampleConnectionPool
program.
Using the example provided, I have created a calss that creates a JNDI
context and binds it in the naming service, however the following
exception gets thrown whenever 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]
The following files are in my Classpath : C:\jdk1.3\lib\fscontext.jar;
C:\jdk1.3\lib\providerutil.jar;C:\jdk1.3\lib\ldap.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,
Rudi