title: Could not open Hibernate Session for Transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
body: <p>While trying to connect with database using hibernate from spring controller  I am getting this error. this is the stack-trace.</p>
  
  <p>How to resolve this?</p>
  
  <pre><code>    19:23:07,432 ERROR [stderr] (ajp--0.0.0.0-8016-11) org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
      19:23:07,432 ERROR [stderr] (ajp--0.0.0.0-8016-11)  at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:596)
      19:23:07,435 ERROR [stderr] (ajp--0.0.0.0-8016-11)  at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
      19:23:07,435 ERROR [stderr] (ajp--0.0.0.0-8016-11)  at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
      19:23:07,435 ERROR [stderr] (ajp--0.0.0.0-8016-11)  at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
      19:23:07,435 ERROR [stderr] (ajp--0.0.0.0-8016-11)  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
      19:23:07,436 ERROR [stderr] (ajp--0.0.0.0-8016-11)  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      19:23:07,436 ERROR [stderr] (ajp--0.0.0.0-8016-11)  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
      19:23:07,436 ERROR [stderr] (ajp--0.0.0.0-8016-11)  at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:585)
  org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
      19:23:07,442 ERROR [stderr] (ajp--0.0.0.0-8016-11)  at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:555)
      19:23:07,442 ERROR [stderr] (ajp--0.0.0.0-8016-11) Caused by: java.sql.SQLException: ORA-28000: the account is locked
  </code></pre>