0 Replies Latest reply: Jan 4, 2007 6:23 AM by 807581 RSS

    access to Oracle 8i DB using iPlanet web server

    807581
      Hi ,
      I have been trying to implement Connection Pooling in my application using the built-in features of iPlanet App server 6.5 . For the same i have made the following entries:

      1. web.xml

      <resource-ref>
      <description>Ptrade Entry</description>
      <res-ref-name>jdbc/ptradeDataSource</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      2. ias-web.xml
      <resource-ref>
      <res-ref-name>jdbc/ptradeDataSource</ref-ref-name>
      <jndi-name>jdbc/ptrade/ptradeDB</jndi-name>
      </resource-ref>
      3. Also my class tries to ge the context using

      try {
      InitialContext ic = new InitialContext();
      ds = (DataSource)ic.lookup("java:comp/env/jdbc/ptradeDataSource");
      }
      catch (NamingException ne) {
      System.out.println("Naming Exception" + ne);
      }
      Connection dbc = ds.getConnection();
      return dbc;

      However i am getting an javax.naming.NameNotfoundException: can't locate jdbc/ptradeDataSource.

      Could somebody pls tell me what is wrong with my configuration and code?