• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Deployed App not connecting to Database

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm using this code to connect to an Oracle databse


When I run this program on my local machine, it works fine, and gets me the result.

However when I deploy this application, and call a servlet (Say X) accessing this class (say Y), it throws an internal server error, and displays "connection close"

Now in class 'Y', even if I'm not calling the method (having the above database connection code), it still throws the error ! Only if I have this code commented, then the rest of the deployed application works properly without any errors.

Any suggestions appreciated.
 
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do SOP for all the objects. Check for which object you are getting null..

System.out.println("Connection object>>>>>" + conn);
System.out.println("Statement object>>>>>" + stmt);
System.out.println("ResultSet object>>>>>" + rset);

Second thing,

Can you show us the stacktrace of the thread?


Thanks


Naseem
reply
    Bookmark Topic Watch Topic
  • New Topic