Discussions
Web tier: servlets, JSP, Web frameworks: nullpointerexception while calling servlets installed on tomcat
-
nullpointerexception while calling servlets installed on tomcat (3 messages)
- Posted by: anil devagiri
- Posted on: March 21 2001 10:25 EST
I am getting nullpointerexception while callinga servlet(which has a jdbc connection) installed on tomcat. but the servlet is working fine while i run it on jdeveloper. i think the problem is with jdbc connection.its not able to find out the driver(iam using a oracle thin driver).do i need to configure any file or edit any scripts?Threaded Messages (3)
- nullpointerexception while calling servlets installed on tomcat by Sanjeev Saxena on March 23 2001 04:26 EST
- nullpointerexception while calling servlets installed on tomcat by joseph yi on March 23 2001 19:30 EST
- nullpointerexception while calling servlets installed on tomcat by Prasath Balakrishnan on March 26 2001 23:05 EST
-
nullpointerexception while calling servlets installed on tomcat[ Go to top ]
- Posted by: Sanjeev Saxena
- Posted on: March 23 2001 04:26 EST
- in response to anil devagiri
Hi !!
Initialize all instance as well as local variables with some values(if u have default otherwise null).
Try it. -
nullpointerexception while calling servlets installed on tomcat[ Go to top ]
- Posted by: joseph yi
- Posted on: March 23 2001 19:30 EST
- in response to anil devagiri
i think you may be right in regards to tomcat's inability to locate oracle's driver. try referencing the driver in your system classpath or put the file in the tomcat/lib directory.
i was able to get a servlet to work using oracle as my DB for fun, but that was awhile back... if, after you put the driver in the classpath and it still doesn't work, let me know and i'll try to give you my example code and settings...
good luck! -
nullpointerexception while calling servlets installed on tomcat[ Go to top ]
- Posted by: Prasath Balakrishnan
- Posted on: March 26 2001 23:05 EST
- in response to joseph yi
Check up all your variables, which includes the resultset.Put a System.out.println( before and after the resultset before closing the resultset) , you can trap it.
Good luck. I had the same problem and i found that it was because of the resultset.Good luck.
Prasath