I have battled with this problem for 2 days running and I kept on having the same error message. I am just moving into Hibernate and I've been able to run a simple application with Hibernate - no problem. However, I just can't get my head around Netbeans as an IDE with Hibernate.
1. I have the Hibernate Plugins
2. I have the flash tutorial from the plugin site (However, few things don't happen as expected).
3. I have gone through the code over and over, I can make a direct connection to the database, but not using Hibernate.
4. For Simplicity I run the application in Tomcat and Datasource also through Tomcat.
5. Database is: MySQL
6. Error message
org.hibernate.exception.JDBCConnectionException: Cannot open connection
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
mypackage.UserFacade.saveUser(UserFacade.java:12)
mypackage.UserFacade.generate(UserFacade.java:22)
org.apache.jsp.index_jsp._jspService(index_jsp.java:71)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
7. No matter what I do, this remains for the past 2 days.
Please help or suggestion will be welcome.
Thank you all.
1. I have the Hibernate Plugins
2. I have the flash tutorial from the plugin site (However, few things don't happen as expected).
3. I have gone through the code over and over, I can make a direct connection to the database, but not using Hibernate.
4. For Simplicity I run the application in Tomcat and Datasource also through Tomcat.
5. Database is: MySQL
6. Error message
org.hibernate.exception.JDBCConnectionException: Cannot open connection
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
mypackage.UserFacade.saveUser(UserFacade.java:12)
mypackage.UserFacade.generate(UserFacade.java:22)
org.apache.jsp.index_jsp._jspService(index_jsp.java:71)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
7. No matter what I do, this remains for the past 2 days.
Please help or suggestion will be welcome.
Thank you all.