1 Reply Latest reply on May 16, 2009 9:45 PM by Luck Modlinski

    PostgreSQL JDBC DataSource class

    Luck Modlinski Newbie

      Hello,
      i'm trying to start PostgreSQL based Seam project. During seam setup I selected /home/.../postgresql-8.3-604.jdbc3.jar (downloaded prior to setup, jar path entered correctly) for JDBC Driver and org.postgresql.jdbc3.Jdbc3ConnectionPool as DataSource class. In JbossTools I can connect to DB, reverse-engineered entities are successfully generated, but after project is redeployed, on every page using entities I got exception:


      Caused by: java.sql.SQLException: Error in allocating a connection. Cause: org.postgresql.jdbc3.Jdbc3ConnectionPool cannot be cast to javax.sql.DataSource
           at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115)
           at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
           at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
           ... 114 more


      Can someone help me get PostgreSQL to work with Seam? Thanks for any advices.


      Regards, Luck