| Author |
Error ##### org.hibernate.exception.GenericJDBCException: Cannot open connection
|
Vinod Vinu
Ranch Hand
Joined: Aug 30, 2009
Posts: 217
|
|
Hi, i'm getting the following error on eclipse's console:-
%%%% Success Creating SessionFactory %%%%
------HIBERNATE SESSION SUCCESSFULLY READ-------
INSERTING RECORDS
Dec 4, 2010 6:22:11 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 0, SQLState: null
Dec 4, 2010 6:22:11 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Communication failure during handshake. Is there a server running on localhost:3306?
Error ##### org.hibernate.exception.GenericJDBCException: Cannot open connection
I'm developing a web application using struts, java, hibernate, tomcat 6 and mysql database.
Hibernate configuration:-
I'm sure that i have given correct database information like its db name, username and password, but don't know what is wrong with it.
Using Navicat i can connect easily with 'vinod' database by providing the same credentials. But why cannot be with hibernate ?
Any idea?
Thanks in advance
|
Vinod Kumar Nair
"Any fool can write code that a computer can understan. Good programmers write code that humans can understand."
|
 |
Vitaliy Kravchenko
Greenhorn
Joined: Dec 02, 2010
Posts: 10
|
|
May be your mySQL Server is off? check this
jdbc:mysql://localhost:3306/vinod
|
 |
Vinod Vinu
Ranch Hand
Joined: Aug 30, 2009
Posts: 217
|
|
May be your mySQL Server is off? check this
jdbc:mysql://localhost:3306/vinod
Please explain me how can i check that if my mysql server is running or not ?
thanks
|
 |
Vitaliy Kravchenko
Greenhorn
Joined: Dec 02, 2010
Posts: 10
|
|
If you have installed mySQL Server as service, check MyComputer -> right click ->control -> and find there Mysql, then check that service is running
Or you can start Client command line, if everything will be ok, then you Server is running
|
 |
Vinod Vinu
Ranch Hand
Joined: Aug 30, 2009
Posts: 217
|
|
I did it, the only solution i found to be is to remove a mysql jar file named 'mysql-connector-java-2.0.14'
It is working now fine.
|
 |
 |
|
|
subject: Error ##### org.hibernate.exception.GenericJDBCException: Cannot open connection
|
|
|