2 Replies Latest reply on Sep 9, 2002 1:56 PM by Javier Torreblanca Beltran

    Postgresql - Could not locate datasource

    Mads Hansen Newbie


      I'm working with an little BMP bean example (Account example from book "Mastering EJB 2"). I can not get it to work with JBoss 3.0.2 and PostgreSQL 7.2.1

      The following exception is thrown when I try to run the client:

      14:17:58,657 ERROR [STDERR] Could not locate datasource! Reason:
      14:17:58,659 ERROR [STDERR] org.jboss.util.NestedSQLException: Failed to register driver for: org.postgresql.Driver; - nested throwable: (java.lang.ClassNotFoundException: org.postgresql.Driver); - nested throwable: (org.jboss.resource.ResourceException: Failed to register driver for: org.postgresql.Driver; - nested throwable: (java.lang.ClassNotFoundException: org.postgresql.Driver))
      14:17:58,661 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.LocalDataSource.getConnection(LocalDataSource.java:106)

      When I start JBoss the following is logged about postgreSQL:

      14:35:28,812 INFO [MainDeployer] Starting deployment of package: file:/opt/jbos
      14:35:28,867 WARN [ServiceController] jboss.jca:service=LocalTxDS,name=Postgres
      DS does not implement any Service methods
      14:35:28,868 INFO [JBossManagedConnectionPool] Creating
      14:35:28,868 INFO [JBossManagedConnectionPool] Created
      14:35:28,870 INFO [JBossManagedConnectionPool] Starting
      14:35:28,871 INFO [JBossManagedConnectionPool] Started
      14:35:28,871 INFO [MainDeployer] Deployed package: file:/opt/jboss-3.0.2/server

      So far what I have done is the following (item 2 and 3 from http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ put postgresql jdbc jar file in $(JONAS_HOME)/lib

      2) add postgres-service.xml to $(JONAS_HOME)/server/default/deploy

      3) edit login-config.xml in $(JONAS_HOME)/server/default/conf

      4) change the default DB to PostgreSQL 7.2 in

      5) add jonas.xml deployment descriptor to my bean jar file.




      I'm I missing something?