Just a thought... is there a null value returned from the database for the
column CASE_DT_TY_CD  that you are refrencing?
It could still be a BigDecimal object but it also could be set to null if
the value in the column returns null for the result set.

Greg.





"Vaidya, Abhijit (CAP, GEFA, Contractor)"
<[EMAIL PROTECTED]> on 2003/01/02 02:23:37 PM

Please respond to "JDJList" <[EMAIL PROTECTED]>

To:   "JDJList" <[EMAIL PROTECTED]>
cc:

Subject:  [jdjlist] RE: CachedRowSet problem



Yes I  did, James....
The  1st line dod give me java.math.BigDecimal as output.
The  next 2 lines will both give me a NullpointerException.
-----Original Message-----
From: James Stauffer  [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003  2:21 PM
To: JDJList
Subject: [jdjlist] RE: CachedRowSet  problem



Did you try the following?
�  System.out.println(� "The value1 ...." +  chcdRowSet.getObject
("CASE_DT_TY_CD").getClass());
� System.out.println(� "The value1 ...." +  chcdRowSet.getObject
("CASE_DT_TY_CD"));
�  System.out.println(� "The value1 ...." +  chcdRowSet.getBigDecimal
("CASE_DT_TY_CD"));

James Amos Nathaniel Stauffer (Off-site)
Yahoo Messenger: Stauffer_James
MSN Messenger:  [EMAIL PROTECTED] (no email please)
Telephone: 715-688-2856

-----Original Message-----
From:  Vaidya, Abhijit (CAP, GEFA, Contractor)
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 1:12 PM
To: JDJList
Subject: [jdjlist] RE: CachedRowSet  problem

same instance of the same database. All machines using the  same code as
show
below, accessing the same column,  same record in the same table.

-regards,
abhi.

-----Original Message-----
From: Paul  Franz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 2:11 PM
To: JDJList
Subject: [jdjlist] RE: CachedRowSet  problem

Question: Are all machines pointing to the same  database?

Paul Franz

----- Original Message -----
From:  "Vaidya, Abhijit (CAP, GEFA, Contractor)"
<[EMAIL PROTECTED]>
To:  "JDJList" <[EMAIL PROTECTED]>
Sent:  Thursday, January 02, 2003 1:51 PM
Subject: [jdjlist]  RE: CachedRowSet problem

> Hi Irene,
> Firstly , thanks  for responding to my mail.
> I have ensured points  1 and 2 a couple of times. In fact, I have tried
this
> scenario on 4 different machines and  it works only on 1.
> 3. chcdRowSet.getObject has  the same effect--a� Nullpointer
> 4.  chcdRowSet.getObject.getClass is what I have tried, and it has
returned
> me a java.Math.BigDecimal as the returning class name.  The point is ,
this
> means that an object exists  but calling any other method on it gives a
>  Nullpointer.
>
> I hope  you can help me out.
>
>  -regards,
> abhu.
>  -----Original Message-----
> From: Troupansky,  Irene [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 02, 2003 12:57 PM
> To: JDJList
> Subject:  [jdjlist] RE: CachedRowSet problem
>
>
> Hi, Abhi,
>
> A couple of questions (some stupid  :-) )
>
> 1. A you sure  you have absolutely the same SDK on all machines?
>  2. Absolutely the same DB drivers?
> 3. What  happens if you change the 3rd println to
>����������  System.out.println(� "The value1 ...." +
>  chcdRowSet.getObject("CASE_DT_TY_CD"));
> 4. What  is the exact statement you are using to do getClass?
>
> Thanks,
>
> Irene Troupansky
>
>
>  -----Original Message-----
> From: Vaidya, Abhijit  (CAP, GEFA, Contractor)
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 31, 2002 2:50 PM
> To: JDJList
> Subject:  [jdjlist] CachedRowSet problem
>
>
> 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
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
>  ____________________________________________________
>
>  ____________________________________________________
> To change your JDJList options, please visit:
> http://www.sys-con.com/java/list.cfm
>
> Be respectful! Clean up your posts  before replying
>  ____________________________________________________
>
>  ____________________________________________________
> To change your JDJList options, please visit:
> http://www.sys-con.com/java/list.cfm
>
> Be respectful! Clean up your posts  before replying
>  ____________________________________________________

____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________
____________________________________________________
To change your  JDJList options, please  visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up  your posts before  replying
____________________________________________________
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________








******************************************************************************
This email message is confidential to the intended recipient and may be
legally privileged. It is intended solely for the addressee. Access to this email by 
anyone else is unauthorized.  Any unauthorised use, dissemination of the information, 
or copying of this message is prohibited.  If you are not the intended addressee, 
kindly notify the sender by return e-mail 
and delete this message.
******************************************************************************


____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to