3 Replies Latest reply on Jan 24, 2002 4:12 PM by tclouser

    Unable to get connectin form DB connection pool

    lakshminarasimhan

      Hi All

      I am working on JBoss2.4.4 on Windows 2000 Professional.
      I created a connection Pool for Oracle using the below configuration.

      oracle.jdbc.driver.OracleDriver


      DefaultDS
      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      jdbc:oracle:thin:@192.168.29.61:1521:EBAP
      SCOTT
      TIGER
      5
      5


      The connection pool is created

      While i try to get connection using a java program below

      try
      {
      // Get a naming context
      InitialContext jndiContext = new InitialContext();

      System.out.println("Got context");

      // Get a reference to the Interest Bean
      javax.sql.DataSource ds = (javax.sql.DataSource)jndiContext.lookup("java:/DefaultDS");
      // Object ref = jndiContext.lookup("java:/DefaultDS");
      System.out.println("Got reference");
      }

      I am getting the following error.

      Got context javax.naming.ServiceUnavailableException: jnp. Root exception is java.net.UnknownHostException: jnp at java.net.InetAddress.getAllByName0(InetAddress.java:571) at java.net.InetAddress.getAllByName0(InetAddress.java:540) at java.net.InetAddress.getByName(InetAddress.java:449) at java.net.Socket.(Socket.java:100) at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:102) at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:776) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:340) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333) at javax.naming.InitialContext.lookup(InitialContext.java:350) at DB.main(DB.java:18)



      Kinldy help me to find how to get connection form connection pool.