Meaningless Drivel is fun!*
The moose likes JBoss/WildFly and the fly likes Deploying Hibernate 3 application in Jboss 4.0.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Deploying Hibernate 3 application in Jboss 4.0.2" Watch "Deploying Hibernate 3 application in Jboss 4.0.2" New topic

Deploying Hibernate 3 application in Jboss 4.0.2

Aaron Raja
Ranch Hand

Joined: Jun 07, 2007
Posts: 206
I am having problem when I deploy web application which use hibernate to connect database.
This application work perfect when I deploy in tomcat 6.
I test the code in test class and it do have connection to database and work fine.

When I deploy it to jboss server I got error

[JDBCExceptionReporter] SQL Error: 0, SQLState: 08001
21:03:08,183 ERROR [JDBCExceptionReporter] No suitable driver
21:03:08,184 ERROR [[Controller]] Servlet.service() for servlet Controller threw exception
org.hibernate.exception.JDBCConnectionException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.convert(
at org.hibernate.exception.JDBCExceptionHelper.convert(
at org.hibernate.exception.JDBCExceptionHelper.convert(
at org.hibernate.jdbc.ConnectionManager.openConnection(
at org.hibernate.jdbc.ConnectionManager.getConnection(
at org.hibernate.jdbc.JDBCContext.connection(
at org.hibernate.transaction.JDBCTransaction.begin(
at org.hibernate.impl.SessionImpl.beginTransaction(

Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(
at org.hibernate.jdbc.ConnectionManager.openConnection(

Thanks, AR
Aurelian Tutuianu
Ranch Hand

Joined: May 13, 2004
Posts: 86
It seems that the jar with the jdbc driver is not found by JBoss. What you have to do is to copy that jar driver into $JBOSS_HOME$/lib or $JBOSS_HOME$/server/default(can_be_other_here)/lib.
Restart also JBoss to load this jar file.
Aaron Raja
Ranch Hand

Joined: Jun 07, 2007
Posts: 206
Thanks Aurelian!
You made my day!
I agree. Here's the link:
subject: Deploying Hibernate 3 application in Jboss 4.0.2
Similar Threads
Problem Getting Started with oracle database from Hibernate ?
Network adapter connection error
Error at session.flush()
Got minus one from a read call - IO Exception