JDBC driver's class ClassNotFoundException occurs in JBoss start-up
Issue
- JDBC driver's class ClassNotFoundException occurs in JBoss start-up
- Some services failed to start due to the ClassNotFoundException in JBoss start-up like:
WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: com.microsoft.sqlserver.jdbc.SQLServerDriver; - nested throwable: (java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver from BaseClassLoader@28de768{vfsfile:/usr/local/jboss/jboss-eap-5.1/jboss-as/server/default/deploy/uuid-key-generator.sar/}))
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:225)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:195)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:639)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:273)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:689)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:424)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
...(snip)...
Caused by: org.jboss.resource.JBossResourceException: Failed to register driver for: com.microsoft.sqlserver.jdbc.SQLServerDriver; - nested throwable: (java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver from BaseClassLoader@28de768{vfsfile:/usr/local/jboss/jboss-eap-5.1/jboss-as/server/rhlClmbr_02/deploy/uuid-key-generator.sar/})
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:489)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:206)
... 76 more
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver from BaseClassLoader@28de768{vfsfile:/usr/local/jboss/jboss-eap-5.1/jboss-as/server/rhlClmbr_02/deploy/uuid-key-generator.sar/}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:477)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:474)
... 77 more
ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.jca:name=JmsXA,service=ConnectionFactoryBinding" is missing the following dependencies:
Dependency "jboss.jca:name=JmsXA,service=TxCM" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.jca:name=JmsXA,service=ManagedConnectionFactory" is missing the following dependencies:
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.jca:name=JmsXA,service=ManagedConnectionPool" is missing the following dependencies:
Dependency "jboss.jca:name=JmsXA,service=ManagedConnectionFactory" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.jca:name=JmsXA,service=TxCM" is missing the following dependencies:
Dependency "jboss.jca:name=JmsXA,service=ManagedConnectionPool" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory" is missing the following dependencies:
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" is missing the following dependencies:
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.connectionfactory:service=ConnectionFactory" is missing the following dependencies:
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.destination:name=DLQ,service=Queue" is missing the following dependencies:
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging.destination:name=ExpiryQueue,service=Queue" is missing the following dependencies:
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging:service=PostOffice" is missing the following dependencies:
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
Deployment "jboss.messaging:service=ServerPeer" is missing the following dependencies:
Dependency "jboss.messaging:service=PersistenceManager" (should be in state "Create", but is actually in state "**ERROR**")
Dependency "jboss.messaging:service=JMSUserManager" (should be in state "Create", but is actually in state "**ERROR**")
Deployment "jboss.mq:service=DestinationManager" is missing the following dependencies:
Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "Configured")
DEPLOYMENTS IN ERROR:
Deployment "jboss.messaging:service=JMSUserManager" is in error due to the following reason(s): java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver from BaseClassLoader@4671b856{vfsfile:/usr/local/jboss/jboss-eap-5.1/jboss-as/server/default/deploy/messaging/mssql-persistence-service.xml}, **ERROR**
Deployment "jboss.messaging:service=PersistenceManager" is in error due to the following reason(s): java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver from BaseClassLoader@4671b856{vfsfile:/usr/local/jboss/jboss-eap-5.1/jboss-as/server/default/deploy/messaging/mssql-persistence-service.xml}, **ERROR**
Deployment "jboss:service=KeyGeneratorFactory,type=HiLo" is in error due to the following reason(s): java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver from BaseClassLoader@28de768{vfsfile:/usr/local/jboss/jboss-eap-5.1/jboss-as/server/default/deploy/uuid-key-generator.sar/}
- server log reports something similar to:
2013-11-08 17:48:23,225 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (Worker1_QueryProcessorQueue5) Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: my.jdbc.Driver; - nested throwable: (java.lang.ClassNotFoundException: my.jdbc.Driver from BaseClassLoader@2bb5c3ba{vfsfile:/D:/Program%20Files/jboss-soa-p-5/jboss-as/server/default/deploy/teiid/teiid-jboss-beans.xml}))
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 4.x
- 5.x
- JDBC Driver
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
