2 Replies Latest reply on Jun 18, 2003 4:51 PM by Joe Veg

    Postgresql 7.2 and JBoss 3.2.1

    Joe Veg Newbie

      I am trying to connect to a NON-local postgres database via TCP. I have modified the pg_hba.conf file in postgres to accept my client machine's IP address.

      However, I can not get any of the authentication methods (ident, password, encrypt, mp5) to work with JBoss 3.2.1. I get errors along the lines of:

      FATAL 1: Password authentication failed for user "test"

      The user "test" can log into postgresql.

      I believe my postgres-ds.xml file is configured correctly.

      I DID notice that hsqldb-ds.xml has more xml to handle TCP connections:

      <!-- this mbean should be used only when using tcp connections -->

      1701
      true
      default
      false
      true



      Do I need to do something similar to get postgresql to work over TCP connections?

      Here is my current postgres-ds.xml file:


      <local-tx-datasource>
      <jndi-name>PostgresDS</jndi-name>
      <connection-url>jdbc:postgresql://192.22.89.67:5432/particidateDB</connection-url>
      <driver-class>org.postgresql.Driver</driver-class>
      <user-name>test</user-name>
      test123
      </local-tx-datasource>


        • 1. Re: Postgresql 7.2 and JBoss 3.2.1
          Joe Veg Newbie

          Anyone? ... anyone? Bueller?

          • 2. Re: Postgresql 7.2 and JBoss 3.2.1
            Joe Veg Newbie

            Well, I haven't fixed it yet, but I can get it to work with a trust connection. For future reference, if you're having problems with this configuration, make sure:

            1. You have the latest driver from: http://jdbc.postgresql.org/ I wasn't getting any errors, per se, but things were acting kooky (Saying my database tables were already created when they clearly weren't there).

            2. This was a useful thread for me, it may help someone else in the future: http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= gist of it is at the end:

            " Apparently the problem was in my jboss.xml file. The doctype line referred to jboss_3_1.dtd which was being set from my build.properties file and being picked up by xdoclet. At some point, I specified jBoss 3.1 because the xdoclet documentation said it was a valid value, but xdoclet would not accept 3.2.

            Thanks for your help.

            Aaron"

            So I can get things to work on a trusted connection. I still can not get any kind of authentication to work. Any help would be appreciated. thanks.