2 Replies Latest reply on May 24, 2002 6:26 PM by obergner

    Working with PostgreSQL

    pascallambert

      Hi,

      I'm trying to test my application on JBoss 3.0.0RC1, Windows XP, PostgreSQL 7.2

      I've found an example of a config file for PostgreSQL (postgres-service.xml) put it in the <jboss_home>\server\default\deploy directory (does it really suppose to be there?) but I've the following error.

      2002-05-24 16:20:21,761 ERROR [STDERR] java.sql.SQLException: Table not found: NINE_HOLE in statement [SELECT ID FROM NINE_HOLE WHERE CLUB_ID=100]
      2002-05-24 16:20:21,821 ERROR [STDERR] at org.hsqldb.Trace.getError(Trace.java:180)
      2002-05-24 16:20:21,851 ERROR [STDERR] at org.hsqldb.Result.(Result.java:175)
      2002-05-24 16:20:21,871 ERROR [STDERR] at org.hsqldb.jdbcConnection.executeHSQL(jdbcConnection.java:907)
      2002-05-24 16:20:21,921 ERROR [STDERR] at org.hsqldb.jdbcConnection.execute(jdbcConnection.java:718)
      2002-05-24 16:20:21,971 ERROR [STDERR] at org.hsqldb.jdbcStatement.fetchResult(jdbcStatement.java:686)
      2002-05-24 16:20:22,021 ERROR [STDERR] at org.hsqldb.jdbcStatement.executeQuery(jdbcStatement.java:68)
      2002-05-24 16:20:22,071 ERROR [STDERR] at org.hsqldb.jdbcPreparedStatement.executeQuery(jdbcPreparedStatement.java:133)
      2002-05-24 16:20:22,111 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.local.PreparedStatementInPool.executeQuery(PreparedStatementInPool.java:862)
      2002-05-24 16:20:22,162 ERROR [STDERR] at ca.caddy.caddyweb.dao.rs.rsNineHole.findAll(rsNineHole.java:185)
      2002-05-24 16:20:22,212 ERROR [STDERR] at ca.caddy.caddyweb.reservation.entity.NineHoleBean.ejbFindAll(NineHoleBean.java:56)
      ... bla bla bla ...

      My PostgreSQL database is running, the table exist.
      Does I must understand from the error that it try to read in the org.hsqldb DB?

      If yes, how do I set it to read my PostgresSQL.

      Thanks.

        • 1. Re: Working with PostgreSQL
          obergner

          Hi Pascal,

          I suspect that you didn't tell jboss to actually use postgres. You have two options:

          1) Configure jboss to globally use postgres. You do so by changing the entry under in standardjbosscmp-jdbc.xml from java:/HypersonicDS to java:/PostgresDS (don't forget to adjust the mapping accordingly). standardjbosscmp-jdbc.xml is located in server/default/conf.

          2) You may also tell jboss to use postgres on a per deployment basis via placing an appropriate jbosscmp-jdbc.xml file in the META-INF directory of your jar package.

          Hope this helps.

          Regards,
          Olaf

          • 2. Re: Working with PostgreSQL
            obergner

            Hi Pascal,

            just to make things easier, I attach my versions of said files. Please not that the bulk of jbosscmp-jdbc.xml is adjusted to my specific needs. I left it in just as an example.

            Regards,
            Olaf