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 How to solve this exception => Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to solve this exception =>"org.hibernate.exception.GenericJDBCException: Cannot open connection"" Watch "How to solve this exception =>"org.hibernate.exception.GenericJDBCException: Cannot open connection"" New topic

How to solve this exception =>"org.hibernate.exception.GenericJDBCException: Cannot open connection"

nami shekar

Joined: Sep 14, 2011
Posts: 17
Hi All,

How to solve this exception, I am getting this when running on jboss.

org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(
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.AbstractBatcher.prepareQueryStatement(
at org.hibernate.loader.Loader.prepareQueryStatement(
at org.hibernate.loader.Loader.doQuery(
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(
at org.hibernate.loader.Loader.doList(
at org.hibernate.loader.Loader.listIgnoreQueryCache(
at org.hibernate.loader.Loader.list(
at org.hibernate.loader.criteria.CriteriaLoader.list(
at org.hibernate.impl.SessionImpl.list(
at org.hibernate.impl.CriteriaImpl.list(
at java.util.TimerThread.mainLoop(
Caused by: java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user 'root'@'Mgmt_SERVER' (using password: YES)"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
at com.mysql.jdbc.MysqlIO.secureAuth411(
at com.mysql.jdbc.MysqlIO.doHandshake(
at com.mysql.jdbc.Connection.createNewIO(
at com.mysql.jdbc.Connection.<init>(
at com.mysql.jdbc.NonRegisteringDriver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(
at org.hibernate.jdbc.ConnectionManager.openConnection(

Thanks in advance
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33113

The relevant par tof that message is:
"Access denied for user 'root'@'Mgmt_SERVER' (using password: YES)"

Is your database configured to have an id called root? Can you try connecting at a command line to verify the database name/user name/password?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: How to solve this exception =>"org.hibernate.exception.GenericJDBCException: Cannot open connection"
It's not a secret anymore!