• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic