The moose likes JBoss/WildFly and the fly likes ClassNotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "ClassNotFoundException" Watch "ClassNotFoundException" New topic


srinivas sv

Joined: Oct 04, 2003
Posts: 13

I am doing a simple entity bean example program using JBOSS. I am getting class not found exception though I have put the driver file into the C:\jboss-3.2.3\server\default\lib directory and mysql-ds.xml in the C:\jboss-3.2.3\server\default\deploy. I am not using standardjbosscmp-jdbc.xml file, is this mandatory file.



The exception is
2005-05-13 09:36:31,678 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/jboss-3.2.3/server/default/deploy/Employee.ear
2005-05-13 09:36:31,693 INFO [org.jboss.deployment.EARDeployer] Init J2EE application: file:/C:/jboss-3.2.3/server/default/deploy/Employee.ear
2005-05-13 09:36:32,271 INFO [org.jboss.ejb.EjbModule] Deploying Employee
2005-05-13 09:36:32,771 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection:
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: com.mysql.jdbc.Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.jdbc.Driver))

Thanks in Advance.
Heonkoo Lee
Ranch Hand

Joined: Feb 10, 2005
Posts: 85
You need to put mysql jdbc driver jar file, not zip file.

And you already have jbosscmp-jdbc.xml which will be used to deploy your beans, instead of standardjboss-cmp.xml in config directory.
[ May 17, 2005: Message edited by: Heonkoo Lee ]
srinivas sv

Joined: Oct 04, 2003
Posts: 13
i resolved the problem thanks alot
Ken Loh
Ranch Hand

Joined: Feb 16, 2005
Posts: 190
Care to tell us how you did that ? By uncompressing your zip file and then copy the jar file in it to your folder as suggested?

Just like to have a more complete closure to this topic so that anyone else who stumbles onto the same path as yours could benefit.

Originally posted by srinivas sv:
i resolved the problem thanks alot

[ June 04, 2005: Message edited by: Ken Loh ]
I agree. Here's the link:
subject: ClassNotFoundException
It's not a secret anymore!