-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Unable to connect to the database, getting exception?
PostPosted: Mon May 07, 2007 7:29 am 
Newbie

Joined: Thu Apr 26, 2007 12:05 pm
Posts: 2
Hi Friends,

While i am trying to connect to the database, i am getting this Exception so what could be the probelm.

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:411)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:354)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

org.hibernate.exception.GenericJDBCException: Cannot open connection
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
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)
tomcatJNDI.AddEditCarFormController.referenceData(AddEditCarFormController.java:85)
org.springframework.web.servlet.mvc.AbstractFormController.showForm(AbstractFormController.java:559)
org.springframework.web.servlet.mvc.SimpleFormController.showForm(SimpleFormController.java:198)
org.springframework.web.servlet.mvc.SimpleFormController.showForm(SimpleFormController.java:175)
org.springframework.web.servlet.mvc.AbstractFormController.showNewForm(AbstractFormController.java:323)
org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:263)
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:819)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:754)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:399)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:354)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

_________________
regards,
Phan


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 07, 2007 8:42 am 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
http://www.hibernate.org/ForumMailingli ... AskForHelp


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 07, 2007 12:29 pm 
Regular
Regular

Joined: Mon Jun 12, 2006 5:33 am
Posts: 63
HI phan,
your connection settings to the database (username, password, ...) might be wrong

_________________
chucky

Don't forget to rate if this helps
-----------------------------------


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 07, 2007 12:45 pm 
Newbie

Joined: Sat May 05, 2007 6:48 pm
Posts: 4
You may also want to make sure that the user has the appropriate privledges. I was getting a very generic exception that I could not figure out - when I manually coded it I got an exception saying that the user didn't have sufficient privledges, which Hibernate had been eating and hiding from me. Changed the users privledges and all is good.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.