-
Bug
-
Resolution: Done
-
Critical
-
7.4.0.GA.CR1
-
None
-
False
-
False
-
-
-
-
-
-
Undefined
-
Latest JDBC driver for Postgres Plus DB return different driver name than is expected by Narayana.
expected: "EDB .*"
actual: "EnterpriseDB JDBC Driver"
Customer impact:
Customers can not use Postgres Plus DB with latest JDBC driver as JDBC object store.
More details:
Narayana has classes for JDBC drivers defined at https://github.com/jbosstm/narayana/tree/master/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/drivers
These driver classes get loaded in https://github.com/jbosstm/narayana/blob/master/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/JDBCStore.java#L217-L253
IOW - it reads the first word in DatabaseMetaData.getDriverName() as lowercase, append `_driver` and try to load such class from https://github.com/jbosstm/narayana/tree/master/ArjunaCore/arjuna/classes/com/arjuna/ats/internal/arjuna/objectstore/jdbc/drivers
For Postgres Plus DB it means there is `edb_driver` class.
This was fine because at the time of adding this functionallty by JBEAP-16408, the driver name string was "EDB Postgres Advanced Server Native Driver", hence `edb_driver` class would be properly identified as the one to use.
In latest JDBC driver for Postgres Plus DB (version 42.2.12.3), this string is now "EnterpriseDB JDBC Driver" which results in searching for driver class `enterprisedb_driver` which is obviously missing as one can see at server-side exception when trying to use Postgres Plus 13.1 as JDBC object store:
23:37:39,189 FATAL [com.arjuna.ats.arjuna] (MSC service thread 1-7) ARJUNA012260: Received exception for com.arjuna.ats.internal.arjuna.objectstore.jdbc.accessors.DataSourceJDBCAccess:JASDTJBossTSTxTable: java.lang.ClassNotFoundException: com.arjuna.ats.internal.arjuna.objectstore.jdbc.drivers.enterprisedb_driver from [Module "org.jboss.jts" from local module loader @4883b407 (finder: local module finder @7d9d1a19 (roots: /tmp/jboss-eap-7.4/modules,/tmp/jboss-eap-7.4/modules/system/layers/base))] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.arjuna.ats.internal.arjuna.objectstore.jdbc.JDBCStore.<init>(JDBCStore.java:251) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.arjuna.common.internal.util.ClassloadingUtility.loadAndInstantiateClass(ClassloadingUtility.java:129) at com.arjuna.ats.arjuna.objectstore.StoreManager.initStore(StoreManager.java:152) at com.arjuna.ats.arjuna.objectstore.StoreManager.getActionStore(StoreManager.java:111) at com.arjuna.ats.arjuna.objectstore.StoreManager.getRecoveryStore(StoreManager.java:68) at com.arjuna.ats.internal.jta.recovery.arjunacore.CommitMarkableResourceRecordRecoveryModule.<init>(CommitMarkableResourceRecordRecoveryModule.java:156) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at com.arjuna.common.internal.util.ClassloadingUtility.loadAndInstantiateClass(ClassloadingUtility.java:135) at com.arjuna.common.internal.util.ClassloadingUtility.loadAndInstantiateClassesWithInit(ClassloadingUtility.java:192) at com.arjuna.ats.arjuna.common.RecoveryEnvironmentBean.getRecoveryModules(RecoveryEnvironmentBean.java:465) at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.loadModules(PeriodicRecovery.java:888) at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.<init>(PeriodicRecovery.java:121) at com.arjuna.ats.internal.arjuna.recovery.RecoveryManagerImple.<init>(RecoveryManagerImple.java:107) at com.arjuna.ats.arjuna.recovery.RecoveryManager.<init>(RecoveryManager.java:481) at com.arjuna.ats.arjuna.recovery.RecoveryManager.manager(RecoveryManager.java:132) at com.arjuna.ats.arjuna.recovery.RecoveryManager.manager(RecoveryManager.java:112) at com.arjuna.ats.jbossatx.jta.RecoveryManagerService.create(RecoveryManagerService.java:54) at org.jboss.as.txn.service.ArjunaRecoveryManagerService.start(ArjunaRecoveryManagerService.java:132) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739) at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701) at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) at java.lang.Thread.run(Thread.java:748)
Proposed solution:
add new driver class `enterprisedb_driver` (which could simply inherit from `edb_driver`)
- is cloned by
-
JBTM-3496 Transaction JDBC object store does not start when using latest JDBC driver for PostgreSQL Plus 13.1
- Closed
- is incorporated by
-
JBEAP-22081 [QA](7.3.z) JBTM-3496 - Transaction JDBC object store does not start when using latest JDBC driver for PostgreSQL Plus 13.1
- Closed
-
JBEAP-22124 Upgrade Narayana to 5.11.3.Final
- Closed