*
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
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
Author

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.

But!!!
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(SQLStateConverter.java:74)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)

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


Thanks, AR
SCWCD 5, SCJP 1.4, OCA (PL/SQL)
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.


http://javasign.blogspot.com/
Aaron Raja
Ranch Hand

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