Forums Register Login

Running Hibernate in Netbeans 5.5

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
What DataSource do you point Hibernate at? Is it valid? Can you show us the code where you configure your SessionFactory?
Oh, sure, you could do that. Or you could eat some pie. While reading this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1071 times.
Similar Threads
How to access a local class in jsp
Error while jsp connecting to database
out of Heap Space
Deploying Hibernate 3 application in Jboss 4.0.2
org.springframework.orm.hibernate3.HibernateJdbcException:
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:52:24.