Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-904

database exception using rhpam70-kieserver-externaldb.yaml when connecting to PostgreSQL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.3.0.GA
    • 7.0.0.GA
    • Cloud
    • OCP3.9

    • 2018 Week 36-38, 2018 Week 39-41

    Description

      Right now using rhpam70-kieserver-externaldb.yaml when connecting to PostgreSQL db will see this exception in the pod log.

      Caused by: java.net.ConnectException: Connection refused (Connection refused)
      ...............
      exception in log:
      Caused by: javax.resource.ResourceException: IJ031102: Failed to load XA datasource: org.postgresql.xa.PGXADataSource
      at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:640)
      at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:493)
      ... 52 more
      Caused by: java.lang.NoSuchMethodException: Method setURL not found
      at org.jboss.jca.adapters.jdbc.util.Injection.inject(Injection.java:139)
      at org.jboss.jca.adapters.jdbc.util.Injection.inject(Injection.java:68)
      at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:635)
      ... 53 more

      I didn't see this exception before in the old rhba70-kieserver-externaldb.yaml when connecting to PostgreSQL, and there is no exception using rhpam70-kieserver-postgresql.yaml.

      So I compared the EAP datasource configuration created by rhpam70-kieserver-externaldb.yaml and by old rhba70-kieserver-externaldb.yaml, and current rhpam70-kieserver-postgresql.yaml.
      The difference is:
      Both rhpam70-kieserver-postgresql.yaml and old rhba70-kieserver-externaldb.yaml created datasource properties like this
      <xa-datasource-property name="DatabaseName">rhpam7</xa-datasource-property>
      <xa-datasource-property name="PortNumber">5432</xa-datasource-property>
      <xa-datasource-property name="ServerName">myapp-postgresql</xa-datasource-property>

      And current rhpam70-kieserver-externaldb.yaml created datasource properties like this:
      <xa-datasource-property name="URL">jdbc:postgresql://external-db:5432/rhpam</xa-datasource-property>

      I tested in my local found:

      1) using PostgreSQL 9.2 JDBC driver, which is the default PostgreSQL JDBC driver in eap7 image in OCP.
      in my local, if the datasource used "URL", would have the same exception.
      in my local, if the datasource used 3 properties (DatabaseName, PortNumber and ServerName), there was no exception.

      I further tested using postgresql-42.2.2.redhat-2.jar (the latest jar to fix RHPAM-740 KIE restarted caused exception)
      in my local, used "URL" or used 3 properties all worked well.

      And I tested in OCP,
      I created a local KIE image using postgresql-42.2.2.redhat-2.jar, and use the rhpam70-kieserver-externaldb.yaml there is no exception.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-fspolti Filippe Spolti
              czhu_jira calvin zhu (Inactive)
              Karel Suta Karel Suta
              Karel Suta Karel Suta
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: