7 Replies Latest reply on Apr 24, 2003 4:31 AM by Maxim

    JBoss 3.2.0 CMP Query Issue with PostgreSQL?

    Allen Johnson Newbie

      I have recently upgraded to jboss 3.2.0 and setup all my resource on it. But when deploying an application that works fine in JBoss 3.0.6, I get errors. The errors occur when accessing ejbs. Apparently, in the error message it shows me an SQL statement like this:

      ===
      HTTP ERROR: 500 EJBException:; nested exception is: javax.ejb.EJBException: null; CausedByException is: Find failed: java.sql.SQLException: Table not found: TOPIC in statement [SELECT t0_o.id FROM TOPIC t0_o]
      ===

      It seems to be uppercasing my tablename, which will not work with Postgresql since its case-sensitive.

      Is there a configuration option I'm missing or is this a bug?

      Thanks,
      Allen

        • 1. Re: JBoss 3.2.0 CMP Query Issue with PostgreSQL?
          Allen Johnson Newbie

          Disregard the message above. It was a datasource configuration error on my part.

          Also, postgresql is NOT case-sensitive.

          Sorry for the confusion.

          Allen

          • 2. Re: JBoss 3.2.0 CMP Query Issue with PostgreSQL?
            zoltron_rr Newbie

            I am having a similar problem with Sybase. Could you share what pool configuration changes you had to make?

            Thanx a bunch,

            Jeff

            • 3. Re: JBoss 3.2.0 CMP Query Issue with PostgreSQL?
              Allen Johnson Newbie

              I didn't realize that my PostgreSQLDS never binding. I had it configured to bind to java:/DefaultDS. This conflicts with the hsql datasource.

              So if that is the same issue, then you can either change your datasource name to something other than DefaultDS, I choose something like java:/<APP-NAME>DS. Or, you can remove the hsql datasource.

              One thing tho if you remove the hsql datasource... I think by default the jms implementation is using it for persistence message storage. If you remove it, then you will need to add the correct tables to whatever you have bound to java:/DefaultDS or change the jms configuration.

              Allen

              • 4. Re: JBoss 3.2.0 CMP Query Issue with PostgreSQL?
                zoltron_rr Newbie

                Thank you.

                I did use a different name for the binding, but I will review my naming to insure I didn't fat finger something.

                Thanx,

                Jeff

                • 5. Re: JBoss 3.2.0 CMP Query Issue with PostgreSQL?
                  Maxim Newbie

                  Hi!
                  I am experiencing same problem and it was not solved yet...;-(
                  I am using JBoss3.2.0RC4, and POstgreSQL7.3 and getting relation not found error when I call findBy...
                  method on CMP ejb.
                  <mefesto78 > suggested to use name pattern for ds jndi names - it ends with DS.
                  I have postgres-dms-profile-ds.xml in the default/deploy dir.
                  ---------------------
                  <?xml version="1.0" encoding="UTF-8"?>


                  <local-tx-datasource>
                  <jndi-name>dms/profile</jndi-name> <connection-url>jdbc:postgresql://pg.elsis:5432/dms_journal</connection-url>
                  <driver-class>org.postgresql.Driver</driver-class>
                  <user-name>max</user-name>
                  max
                  </local-tx-datasource>


                  --------------------
                  Then, in the jbosscmp-jdbc.xml descriptor I define these defaults:
                  ----------------
                  <jbosscmp-jdbc>

                  java:/dms/profile
                  ......
                  -----------------

                  I didn't have a problem with jboss3.0.6 - and i'am using it now. But I want to start using the jboss3.2.0 once I solve this problem...

                  Thank you for your help!
                  --mk.

                  • 6. Re: JBoss 3.2.0 CMP Query Issue with PostgreSQL?
                    Maxim Newbie

                    Hi!
                    I am experiencing same problem and it was not solved yet...;-(
                    I am using JBoss3.2.0RC4, and POstgreSQL7.3 and getting relation not found error when I call findBy...
                    method on CMP ejb.
                    <mefesto78 > suggested to use name pattern for ds jndi names - it ends with DS.
                    I have postgres-dms-profile-ds.xml in the default/deploy dir.
                    ---------------------
                    <?xml version="1.0" encoding="UTF-8"?>


                    <local-tx-datasource>
                    <jndi-name>dms/profile</jndi-name> <connection-url>jdbc:postgresql://pg.elsis:5432/dms_journal</connection-url>
                    <driver-class>org.postgresql.Driver</driver-class>
                    <user-name>max</user-name>
                    max
                    </local-tx-datasource>


                    --------------------
                    Then, in the jbosscmp-jdbc.xml descriptor I define these defaults:
                    ----------------
                    <jbosscmp-jdbc>

                    java:/dms/profile
                    ......
                    -----------------

                    I didn't have a problem with jboss3.0.6 - and i'am using it now. But I want to start using the jboss3.2.0 once I solve this problem...

                    Thank you for your help!
                    --mk.

                    • 7. Re: JBoss 3.2.0 CMP Query Issue with PostgreSQL?
                      Maxim Newbie

                      Hi!
                      I am experiencing same problem and it was not solved yet...;-(
                      I am using JBoss3.2.0RC4, and POstgreSQL7.3 and getting relation not found error when I call findBy...
                      method on CMP ejb.
                      <mefesto78 > suggested to use name pattern for ds jndi names - it ends with DS.
                      I have postgres-dms-profile-ds.xml in the default/deploy dir.
                      ---------------------
                      <?xml version="1.0" encoding="UTF-8"?>


                      <local-tx-datasource>
                      <jndi-name>dms/profile</jndi-name> <connection-url>jdbc:postgresql://pg.elsis:5432/dms_journal</connection-url>
                      <driver-class>org.postgresql.Driver</driver-class>
                      <user-name>max</user-name>
                      max
                      </local-tx-datasource>


                      --------------------
                      Then, in the jbosscmp-jdbc.xml descriptor I define these defaults:
                      ----------------
                      <jbosscmp-jdbc>

                      java:/dms/profile
                      ......
                      -----------------

                      I didn't have a problem with jboss3.0.6 - and i'am using it now. But I want to start using the jboss3.2.0 once I solve this problem...

                      Thank you for your help!
                      --mk.