• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

org.hibernate.exception.GenericJDBCException: Cannot open connection

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends,

I am deploying my ear file using NetBeans 6.5.1,Jboss 5.0.1GA and hibernate.
But while running my application I am getting some exception..The details are given below....


While debugging the code the error point is....

What I understand is that while an entity want to connect with the database its throwing the above Exception..
There is no problem for a JSP to communicate with database using session bean....It running fine..
Please help me out to sort the problem..
My persistence.xml looks like this...

 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is your datasource you use here "<jta-data-source>java:/jnrldc/mysql83</jta-data-source> " correct? Can you open a connection with the parameters saved there?
 
Ankit Varshney
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes ,Its Right
As I am able to retrieve my user name and password from a Jsp Page using the session bean,So I dont think its a problem of DataSource....
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey ankit,
the problem, which i am seeing here is that, may be your entities are not connected with the database, can you tell me that at which point you have defined that. entity to connect to database. Have makes all the entries in **-ds.xml in jboss deploy directory, if not then you need to make that, the other problem which may is that, you will not be getting the reference of NamedQuery in which you are passing the parameter, can you also show us the code of your Entity, so that we can look into that, also show your **-ds.xml file code.

Thanks
With Regards
Amar Deep Singh
http://amardeep.100webspace.net
 
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic