• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Null pointer exception using CachedRowSetImpl in Servlet

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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
 
Raju
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks... got my display name updated!
 
author & internet detective
Posts: 41086
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Raju
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
author & internet detective
Posts: 41086
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic