wood burning stoves 2.0*
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
Author

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

nami shekar
Greenhorn

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(SQLStateConverter.java:91)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
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:327)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:118)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2150)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1550)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:298)
at com.tel.database.EMSDBGenerics.retrieveAll(EMSDBGenerics.java:180)
at com.tel.emsstatemanagement.EMSStateCheck.retrieve(EMSStateCheck.java:246)
at com.tel.emsstatemanagement.EMSStateCheckTask.run(EMSStateCheckTask.java:66)
at java.util.TimerThread.mainLoop(Timer.java:534)
at java.util.TimerThread.run(Timer.java:484)
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(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1906)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:2520)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:817)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1786)
at com.mysql.jdbc.Connection.<init>(Connection.java:450)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
at java.sql.DriverManager.getConnection(DriverManager.java:620)
at java.sql.DriverManager.getConnection(DriverManager.java:169)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:324)


Thanks in advance
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

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?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to solve this exception =>"org.hibernate.exception.GenericJDBCException: Cannot open connection"
 
Similar Threads
Cannot insert record into Database!
Got minus one from a read call - IO Exception
Deploying Hibernate 3 application in Jboss 4.0.2
Error in opening connection
using MySql