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