File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Hibernate + mysql jdbc on production Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate + mysql jdbc on production" Watch "Hibernate + mysql jdbc on production" New topic

Hibernate + mysql jdbc on production

camilo lopes
Ranch Hand

Joined: Aug 08, 2007
Posts: 202
Hi Buddies,
I am using JSF + Hibernate + mysql on my application when i put the application on prod, i am seeing this error, when i try to list the users added the db. see:

i did not get to understand, why it is happening.. anyone could i help me, please?


Brazil - Sun Certified Java Programmer - SCJP 5 About Java - Update every Week.
Guide SCJP - tips that you need know
Stephan Mueller
Ranch Hand

Joined: May 05, 2010
Posts: 50
I can't give you a solution but, if your problem is to untangle the exceptions, here is my suggesstion for what you should look at

...which from my understanding means, that your hibernate instance is not able to connect to the
mysql instance correctly or the connection gets dropped during execution of your
application. Might be a firewall/network issue or a hibernate DS configuration issue.
As stated, I'm not sure.

Hope there're some usefull pointers in it.

Good luck!

1. Make it run - 2. Make it run correctly - 3. Make it pretty OR fast/small - 4. ??? - 5. Profit
camilo lopes
Ranch Hand

Joined: Aug 08, 2007
Posts: 202
hi Steplan

its strange, my config hibernate is:

is not correct?

Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 662

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

This shows, that hibernate is not able to connect to mysql server. So, can you please check manually, whether are you able to connect to the mysql server...
I agree. Here's the link:
subject: Hibernate + mysql jdbc on production
It's not a secret anymore!