wood burning stoves 2.0*
The moose likes JDBC and the fly likes Null pointer exception using CachedRowSetImpl in Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Null pointer exception using CachedRowSetImpl in Servlet" Watch "Null pointer exception using CachedRowSetImpl in Servlet" New topic
Author

Null pointer exception using CachedRowSetImpl in Servlet

Raju
Greenhorn

Joined: Mar 18, 2004
Posts: 5
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...

Error:
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

"Ramon",

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.

Thanks!
bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Raju
Greenhorn

Joined: Mar 18, 2004
Posts: 5
Thanks... got my display name updated!
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

Raju,
Thanks for changing your display name.

Fron the exception, it looks like the program can't find your properties file. Try checking that it is in the web project's classpath.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Raju
Greenhorn

Joined: Mar 18, 2004
Posts: 5
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...
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

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
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.

Thanks...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

"Raju VS",

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://aspose.com/file-tools
 
subject: Null pointer exception using CachedRowSetImpl in Servlet
 
Similar Threads
log4j addA
Unable to utilize Application Resources
the question about CachedRowSet and CachedRowSetImpl
Struts with Resin
using datasource help