• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running Hibernate in Netbeans 5.5

 
Abiodun Okusolubo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What DataSource do you point Hibernate at? Is it valid? Can you show us the code where you configure your SessionFactory?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic