1 Reply Latest reply: Aug 29, 2013 6:44 AM by Abhinav Shrivastav RSS

Cannot re-connect to database on JBOSS AS 7.1

Abhinav Shrivastav Newbie

Hi,

We are using JBOSS AS 7.1.

We are trying to setup our database in a way that whenever the DB goes down and comes back up again, jboss should be able to reconnect again. We have added the Validation class and exception class sorter to the standalone file, but still unable to resolve this. We are getting an error as below. 04:02:08,286 WARN [org.jboss.modules] (ConnectionValidator) Failed to define class com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker in Module "com.mysql:main" from local module loader @7fb7db23 (finder: local module finder @7f941856 (roots: /opt/jboss-eap-6.1/modules,/opt/jboss-eap-6.1/modules/system/layers/base)): java.lang.LinkageError: Failed to link com/mysql/jdbc/integration/jboss/MysqlValidConnectionChecker (Module "com.mysql:main" from local module loader @7fb7db23 (finder: local module finder @7f941856 (roots: /opt/jboss-eap-6.1/modules,/opt/jboss-eap-6.1/modules/system/layers/base))) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:407) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:254) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.Module.loadModuleClass(Module.java:518) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.2.0.CR1-redhat-1] at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_15] at java.lang.Class.forName(Class.java:266) [rt.jar:1.7.0_15] at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.loadPlugin(BaseWrapperManagedConnectionFactory.java:1000) at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:1104) at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:512) at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.getInvalidConnections(BaseWrapperManagedConnectionFactory.java:923) at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.validateConnections(SemaphoreArrayListManagedConnectionPool.java:890) [ironjacamar-core-impl-1.0.16.Final-redhat-1.jar:1.0.16.Final-redhat-1] at org.jboss.jca.core.connectionmanager.pool.validator.ConnectionValidator$ConnectionValidatorRunner.run(ConnectionValidator.java:277) [ironjacamar-core-impl-1.0.16.Final-redhat-1.jar:1.0.16.Final-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_15] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_15] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_15] Caused by: java.lang.NoClassDefFoundError: org/jboss/resource/adapter/jdbc/ValidConnectionChecker at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_15] at java.lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0_15] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_15] at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:338) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:402) [jboss-modules.jar:1.2.0.CR1-redhat-1] ... 19 more Caused by: java.lang.ClassNotFoundException: org.jboss.resource.adapter.jdbc.ValidConnectionChecker from [Module "com.mysql:main" from local module loader @7fb7db23 (finder: local module finder @7f941856 (roots: /opt/jboss-eap-6.1/modules,/opt/jboss-eap-6.1/modules/system/layers/base))] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.2.0.CR1-redhat-1] at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.2.0.CR1-redhat-1] ... 24 more 04:02:08,296 WARN [org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory] (ConnectionValidator) Exception trying to create valid connection checker (disabling):: java.lang.Exception: Unable to load: com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.loadPlugin(BaseWrapperManagedConnectionFactory.java:1027) at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:1104) at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:512) at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.getInvalidConnections(BaseWrapperManagedConnectionFactory.java:923) at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.validateConnections(SemaphoreArrayListManagedConnectionPool.java:890) [ironjacamar-core-impl-1.0.16.Final-redhat-1.jar:1.0.16.Final-redhat-1] at org.jboss.jca.core.connectionmanager.pool.validator.ConnectionValidator$ConnectionValidatorRunner.run(ConnectionValidator.java:277) [ironjacamar-core-impl-1.0.16.Final-redhat-1.jar:1.0.16.Final-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_15] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_15] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_15]