2 Replies Latest reply on Aug 6, 2003 11:10 AM by artmotion

    Problem when deploying PostgreSQL

    duron

      Hi,

      I am trying to configure Jboss3.2.1 to use PostgreSQL. I have copied the driver to the lib folder. I also have postgres-ds.xml modified as

      <?xml version="1.0" encoding="UTF-8"?>


      <!-- ==================================================================== -->

      <!-- Datasource config for Postgres -->

      <!-- ==================================================================== -->



      <local-tx-datasource>

      <jndi-name>PostgresDS</jndi-name>

      <connection-url>jdbc:postgresql://localhost:5432/db_jboss</connection-url>

      <driver-class>org.postgresql.Driver</driver-class>

      <user-name>xxx</user-name>

      yyy

      </local-tx-datasource>







      When I tried to deploy some entity beans(the example cmp2), I got the following error message,

      -----------------err message --------------------------

      15:07:08,983 ERROR [EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Error while creating table; - nested throwable: (java.sql.SQLException: ERROR: parser: parse error at or near "desc"
      )
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:178)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:87)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:499)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:410)
      ...............................................
      ................................................
      ............................................................
      -----------------------end of error message -------

      by the way, my jdbc driver's name is jdbc7.1-1.2.jar, is it necessary to changer it to a special name so that jboss can find it ?

      Any help is appreciated.

      Thanks in advance.

        • 1. Re: Problem when deploying PostgreSQL
          davidjencks

          desc is a reserved sql keyword ("descending") in postgres. Name your column something else.

          • 2. Re: Problem when deploying PostgreSQL
            artmotion

            Fixing desc to description or so is simple.

            But the Jboss complains about not finding a auto-increment template for PostgreSQL.

            Removing the <auto-increment/> tag gives a new error: Can insert null on not null field (attribute id).....

            Could you provide the steps to get the cmp2 example running on PostgreSQL (and if it would not to much, could you please make it as detailed as possible) ?