1 Reply Latest reply on Jan 29, 2003 1:31 PM by Rodrigo Machado Benevides

    jdbc not bound - NameNotFoundException?

    Carl Ahrens Newbie


      I am a new user of JBoss (3.0.4) and have some problems with a Postgresql datasource.

      The datasource is created and bound to java:/jdbc/PostgresDS and is visible in the JNDIViewer in jmx-console.

      In my war-file i have created the jboss-web.xml file in the WEB-INF directory containing the following text:


      and the web.xml file contains the following section:

      Datasource for Postgresql

      Now to my problem.

      When I try to call my datasource using:

      Context compEnv = (Context) initCtx.lookup("java:comp/env/jdbc/PostgresDS");

      I got a "jdbc not bound - NameNotFoundException"

      But when I am using the jndi name "java:/jdbc/PostgresDS" instead it works fine.

      Why does it not work with the local jndi name, have I missed something in my configuration?