Web console automatically sets `datasource-class` attribute for non-XA datasource in JBoss EAP 7.2
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7.2
- All datasource types
Issue
-
When creating a non-XA datasource using the EAP web console, the wizard automatically sets the
datasource-class
attribute even if not specified by the user.-
For instance, for a PostgreSQL datasource, the following is added to the configuration:
<datasource-class>org.postgresql.ds.PGSimpleDataSource</datasource-class>
-
- This overrides the
driver-class
specified implicitly by JDBC-compliant drivers in the driver archive'sMETA-INF/services/java.sql.Driver
.
Resolution
This issue1 is resolved in EAP 7.2 cumulative patch (CP) 2 and later. However, even after patch application, datasources created prior to application of the cumulative patch will require manual correction (if not already performed):
- The
datasource-class
attribute line should be removed manually from thestandalone*.xml
ordomain.xml
Note that datasources created using the CLI interface will not exhibit this issue.
See also
Root Cause
This is a known defect (HAL-1570) in early EAP 7.2 releases.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments