javax.naming.NoPermissionException; remaining name '"/"'
843854Jan 31 2003 — edited Nov 3 2003Dear Friends:
I have a problem accesing an Oralce database. The most courious thing is that this code works fine in Windows but not in Linux (red hat 8, jvm1.4.1). The exception is javax.naming.NoPermissionException; remaining name '"/"'.
I connect to the database.with the following code:
(...)
entorno=new Hashtable();
entorno.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.fscontext.RefFSContextFactory");
//entorno.put(Context.PROVIDER_URL,"file:.");
ctx=new InitialContext(entorno);
ocpds=new OracleConnectionPoolDataSource();
ocpds.setDriverType("thin");
ocpds.setNetworkProtocol("tcp");
ocpds.setServerName(servidor);
ocpds.setDatabaseName(sid);
ocpds.setPortNumber(puerto);
ocpds.setUser(usuario);
ocpds.setPassword(contrasena);
ctx.rebind(nombreFuenteDatos,ocpds);
ocpds=(OracleConnectionPoolDataSource)ctx.lookup(nombreFuenteDatos);
ocache=new OracleConnectionCacheImpl(ocpds);
ocache.setMaxLimit(NUMERO_MAXIMO_CONEXIONES);
ocache.setMinLimit(NUMERO_MINIMO_CONEXIONES);
ocache.setCacheScheme(ocache.DYNAMIC_SCHEME);
(...)
It fails when I make the rebind instruction. I have another question: �is that the best way to connect to an Oracle database? I have observed that when I connect with the db, in the directory where the program is running appears a file called ".bindings", with all the information about the connection. I don't like that very much, but I don't know another way to make it.
We are working in an intranet with 3 different Oracle servers and a lot of clients (more than 100). The Java aplication is on an different server, and I distribute the application with Java Web Start.
As I say, it works fine on Windows, but we are thinking to change al the clients to linux (works better), but I have this little problem.
Thank you very much.
Roque.