-
Bug
-
Resolution: Done
-
Major
-
7.0.0.GA
-
OCP3.9
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.
- is caused by
-
CLOUD-2851 Ignore empty XA_CONNECTION_PROPERTY_property properties
- Verified
-
CLOUD-2845 XA Properties are added to a datasrouce even they are empty
- Closed
- is cloned by
-
RHDM-764 database exception using rhdm71-optaweb-employee-rostering-externaldb.yaml when connecting to PostgreSQL
- Closed
- is related to
-
RHPAM-2002 Some external databases fail when using externaldb template
- Closed
-
RHPAM-1445 Cannot use external DB2 database with externaldb template
- Closed
-
RHDM-764 database exception using rhdm71-optaweb-employee-rostering-externaldb.yaml when connecting to PostgreSQL
- Closed
-
RHPAM-1092 Provide support and tools for additional JDBC drivers in RHPAM/OCP
- Closed
-
RHPAM-1558 Use cekit and the supported way to build extension images to provide third party jdbc drivers
- Closed
- relates to
-
CLOUD-3462 [os-eap-launch] Add workaround for the 'Method setURL not found' failure
- New
-
RHPAM-740 Kie server with PostgreSQL 9.6 fails when its pod is restarted
- Closed