Hi All,
I have been facing a wierd problem when dealing with CachedRowSet objects.
This is the sun.jdbc.rowset.CachedRowSet object
if((chcdRowSet != null) && (chcdRowSet.size() > 0)){
while (chcdRowSet.next())
{
System.out.println( "The value2 ...." +
chcdRowSet.getObject("CASE_DT_TY_DESC"));
System.out.println( "The value3 ...." +
chcdRowSet.getObject("NBR_DT_TXT_IND"));
System.out.println( "The value1 ...." +
chcdRowSet.getBigDecimal("CASE_DT_TY_CD"));
}
In the above piece of code, we have been experiencing a NullpointerException
on the 3rd Sys.out. The object in the cachedRowSet is of a BigDecimal type,
which is seen when we did a getClass on the cachedRowset. However, any other
method called on that object returns a NullPointerException .
The problem seems to be with the BigDecimal object that is made inside the
CachedRowset object. For some reason, any method called on this object
returns a NullPointerException, EXCEPT for a getClass. If the getClass
method works, it does mean that the object exists!!
The wierdest thing about the whole issue is that this works on some machines
and does not work on other machines!! We have tried everything in our hands
to ensure that the setup on the 2 machines is identical. But for some
reason, the code fails one machine and works on the other.
Has anyone ever used the CachedRowSet, and if so, have you ever faced
problems of a similar kind with it?
I hope someone has some solution for me. I would be more than grateful,
since it has been bugging our entire team for quite some time now.
-regards,
abhi.
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm
Be respectful! Clean up your posts before replying
____________________________________________________