Title:

I have used the OracleConnectionPoolDataSource form a normal class, with out binding it to JNDI and it works fine.  When i try and bind it i get an exception that saying :
Error binding to server: java.io.NotSerializableException: oracle.jdbc.driver.OracleDriver
Anyone got this working?
this is the code in the constructor of a normal class. im using Oracle8i 1.1.7

Thanks alot for any help you can give!

Harley Rana.

        try{
            System.setProperty("java.naming.factory.initial","com.evermind.server.ApplicationClientInitialContextFactory");
            System.setProperty("java.naming.provider.url", "ormi://localhost/Togotech");
            System.setProperty("java.naming.security.principal","admin");
            System.setProperty("java.naming.security.credentials","rana21b");
           
            InitialContext jndiContext = new InitialContext();
            OracleConnectionPoolDataSourcepool = new oracle.jdbc.pool.OracleConnectionPoolDataSource();
            pool.setURL("jdbc:oracle:thin:@localhost:1521:net");
            pool.setUser("scott");
            pool.setPassword("tiger");
            pool.setDataSourceName("Togotech_Data");
            System.out.println("Binding to JNDI...");
            jndiContext.rebind("OracleDatasource",pool);
        }catch(SQLException s){
            System.out.println("SQL exception - "+s);
        }
        catch(NamingException n){
            System.out.println("Naming exception - "+n);
        }

Reply via email to