• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Getting GenericJDBCException

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to this forum . I have implemented small application i.e for retrieving data from the database and displaying data on the console. For this I have implemented one JSF file it containing one button whenever I click on the button it is going to call the controller but the problem is whenever I am clicking on button my controller was calling but it is giving an error i.e.

org.hibernate.exception.GenericJDBCException: Cannot open connection

can any one tell me how to resolve this problem?

Regards
Sumanth
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate can't open a connection to your database. Check you DataSource configuration - is it correct?
 
tara krishna
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where I have to datasource name in case of hibernate.
 
tara krishna
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry that was grammar mistake i.e where I have to check my datasource name in case of hibernate.
 
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you are building a console (stand alone) application, one way to configure hibernate is in the hibernate configuration xml file.

that is the hibernate.cfg.xml file at the top of your classpath.

if you are using hibernate 3, here is a link to the configuration reference to set up the datasource in the hibernate.cfg.xml.
http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html#tutorial-firstapp-configuration
 
The knights of nee want a shrubbery. And a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic