Null pointer exception using CachedRowSetImpl in Servlet
Raju
Greenhorn
Joined: Mar 18, 2004
Posts: 5
posted
0
I'm trying to use CachedRowSetImpl. Created a ResultSet object and passed it to populate method of CachedRowSetImpl. This is working fine in Java program. But when using the same code inside a servlet i'm getting null pointer exception. I have also copied the rowset.jar into common/lib as well as web-inf/lib. Can anybody help please...
We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.
In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
The properties file is being read only when if rowset.jar is placed in "C:\Program Files\Java\j2re1.4.1_05\lib\ext" or else the classpath is explicitly set in "setclasspath.bat" in Tomcat4.1 bin directory.
My doubt is that why, even if the rowset.jar is placed in "tomcat/common/lib" or "web-inf/lib", the properties file is not read.
Whatever is necessary I have to do it within the application as it will be packaged and delivered to client for deployment. Any suggestions...
Raju, I don't think it is having problems reading the jar. I think it is having problems reading some properties file. Do you know what file it is looking for and where it is located?
Raju
Greenhorn
Joined: Mar 18, 2004
Posts: 5
posted
0
Got some good news... downloaded jdbc_rowset_tiger-1_0_1-mrel-jwsdp.zip and got the rowset jar from this distribution. This one is working fine for me if I place the jar in web-inf/lib as expected without any exceptions.
You have changed your display name to an invalid name. VS is not valid for a last name. Please be advised that accounts with invalid display names are subject to closure.
bear Forum Bartender
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Null pointer exception using CachedRowSetImpl in Servlet