This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes org.hibernate.exception.GenericJDBCException: Cannot open connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply locked New topic
Author

org.hibernate.exception.GenericJDBCException: Cannot open connection

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 397
Hibernate Connection issue while its also not inserting the records in database.

I am using mysql and my setting is


Reddy Prashanth
Ranch Hand

Joined: Aug 09, 2005
Posts: 61
Hi,

In the cfg file, the valule for the property "hibernate.hbm2ddl.auto" is mentioned as "insert". I don't think this is a valid value.

The valid values are : validate | update | create | create-drop
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 397
that is right You are saying but even simple jdbc connection is not working
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19739
    
  10

Did you explicitly set your MySQL instance to listen on port 3036, or is that a typo in your code? The default port for MySQL is 3306. Since the error message says you can't open the connection, I guess it's a typo in your code. Specify the correct port there.

However I see you already have another long thread in which the difference between 3036 and 3306 has been discussed at length. Please don't post the same problem in multiple threads, it is confusing and wasteful. I will close this one.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.hibernate.exception.GenericJDBCException: Cannot open connection
 
It's not a secret anymore!