Skip to main content

CachedRowSetImpl

1 reply [Last post]
dags
Offline
Joined: 2003-06-10

Hi,

I am having a problem with CachedRowSetImpl, PostgreSQL jdbc driver and jdk 1.6.0-rc-b92.
Previously I was using 1.6.0-beta2-b82 without troubles. After changing to b92, postgresql driver starts complaining that CachedRowSetImpl's internal ResultSet is TYPE_FORWARD_ONLY and needs a TYPE_SCROLL_SENSITIVE or TYPE_SCROLL_INSENSITIVE one. In fact, I verified that CachedRowSetImpl's getType() returns TYPE_SCROLL_INSENSITIVE but postgresql driver still see it as one of a different type.

Just changing back to b82, without any other change (same code, same postgresql driver, same Netbeans project), solves the problem and my code start to working OK again.

Any idea ?. Below is the the stack trace.

<br />
org.postgresql.util.PSQLException: Operation requires a scrollable ResultSet, but this ResultSet is FORWARD_ONLY.<br />
        at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkScrollable(AbstractJdbc2ResultSet.java:189)<br />
        at org.postgresql.jdbc2.AbstractJdbc2ResultSet.absolute(AbstractJdbc2ResultSet.java:195)<br />
        at com.sun.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:7183)<br />
        at com.sun.rowset.CachedRowSetImpl.populate(CachedRowSetImpl.java:602)<br />
        at com.sun.rowset.internal.CachedRowSetReader.readData(CachedRowSetReader.java:180)<br />
        at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:685)<br />
        at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:1347)<br />
        at com.adminsa.beans.clickableList.ClickableList.populate(ClickableList.java:164)<br />
        at com.adminsa.beans.clickableList.ClickableList.setSqlQuery(ClickableList.java:238)<br />
        at com.adminsa.beans.clickableList.ClickableList.setTable(ClickableList.java:205)<br />
        at com.adminsa.accounting.gui.SumasYSaldosPanel.initComponents(SumasYSaldosPanel.java:202)<br />
        at com.adminsa.accounting.gui.SumasYSaldosPanel.(SumasYSaldosPanel.java:29)<br />
        at com.adminsa.accounting.gui.SumasYSaldosPanel$2.run(SumasYSaldosPanel.java:286)<br />
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)<br />
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)<br />
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)<br />
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)<br />
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)<br />
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)<br />
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)<br />
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)<br />

Diego.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dags
Offline
Joined: 2003-06-10

Answering to myself ...

I downloaded b82 and b92 sources and compared CachedRowSetImpl.java en both releases.

It is strange, at least to me, that both source files includes the following header:

[code]
/*
* @(#)CachedRowSetImpl.java 1.18 06/03/24
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
[/code]

but have some differences !. I will try to find if any of these differences is causing my troubles.

JdbcRowSetImpl.java have too same version number and date but different code.

I will keep searching why my code fails with b92 and will inform my findings.

Regards,
Diego.