Javatpoint Logo

why org.hibernate.exception.GenericJDBCException: Cannot open connection occurs?

By: niyaz.*** On: Mon Feb 03 22:47:33 IST 2014     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
Hi,
I am getting org.hibernate.exception.GenericJDBCException: Cannot open connection while running hibernate program.I have installed Oracle 10g express edition.The description is as follows:
Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
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:420)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
at com.java.project.hibernate.StoreData.main(StoreData.java:22)
Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12518, TNS:listener could not hand off client connection
The Connection descriptor used by the client was:
localhost:1521:XE

Please tell me the solution.

Regards,
Niyaz

Up0Down