X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 64F5932A150 for ; Wed, 29 Sep 2004 17:39:03 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11000-10 for ; Wed, 29 Sep 2004 16:38:51 +0000 (GMT) Received: from web52410.mail.yahoo.com (web52410.mail.yahoo.com [206.190.39.118]) by svr1.postgresql.org (Postfix) with SMTP id 96DC1329F2A for ; Wed, 29 Sep 2004 17:38:49 +0100 (BST) Message-ID: <20040929161715.28323.qmail@web52410.mail.yahoo.com> Received: from [65.67.5.2] by web52410.mail.yahoo.com via HTTP; Wed, 29 Sep 2004 09:17:15 PDT Date: Wed, 29 Sep 2004 09:17:15 -0700 (PDT) From: "William I. Zumwalt" Subject: jdbc:postgresql:database not bound error To: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/202 X-Sequence-Number: 11092 Hey all, I'm using ... JBoss 3.2.5 pg74.215.jdbc3.jar postgres7.4.5 When I load my app in jboss, jboss sees postgres as 09:32:37,214 INFO [PostgresDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=PostgresDS to JNDI name 'java:/PostgresDS' And I'm getting the following error ... 10:36:26,231 INFO [STDOUT] Exception: jdbc:postgresql:megs not bound Anyone have ideas what the prob could be. I've got the following code below. --- public static final String DRIVER = "org.postgresql.Driver"; public static final String DBURL = "jdbc:postgresql:megs"; // megs is my dbase name private static transient DataSource dataSource = null; static { try { Class.forName(DRIVER); } catch(ClassNotFoundException cnfe) { System.out.println("ClassNotFoundException: " + cnfe.getMessage()); } } public static Connection createConnection() throws SQLException { if (dataSource == null) { try { Context context = new InitialContext(); dataSource = (DataSource) context.lookup(DBURL); } catch (Exception e) { System.out.println("Exception: " + e.getMessage()); } } return dataSource.getConnection(); } Any help much appreciated. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com