This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
from Customer issue sent to nb-users: "I’m trying to put and “ADD” button to a table with the following code: public String add_action() { // TODO: Process the action. Return value is a navigation // case name where null will return to the same page. try { if ( cachedRowSetDataProvider1.canAppendRow() ) { RowKey appendedRow = cachedRowSetDataProvider1.appendRow(); if ( appendedRow != null ) { cachedRowSetDataProvider1.setCursorRow(appendedRow); cachedRowSetDataProvider1.setValue("hacod", appendedRow, "XXX"); cachedRowSetDataProvider1.setValue("hadesign", appendedRow, "YYYYY"); cachedRowSetDataProvider1.commitChanges(); } } else { error("Cannot append row"); } } catch (Exception e) { throw new FacesException(e); } return null; } However I’me getting : java.sql.SQLException: Invalid cursor position at com.sun.rowset.CachedRowSetImpl.rowDeleted(CachedRowSetImpl.java:3893) at com.sun.data.provider.impl.CachedRowSetDataProvider.setValue(CachedRowSetDataProvider.java:793) at com.sun.data.provider.impl.AbstractTableDataProvider.setValue(AbstractTableDataProvider.java:135) at webcurr.Habilitacoes.add_action(Habilitacoes.java:598) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) …. The exception corresponds to the setCursorRow. The data provider is declared as: private CachedRowSetDataProvider cachedRowSetDataProvider1 = new CachedRowSetDataProvider(); and at the init: cachedRowSetDataProvider1.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{SessionBean1.cuhabilitacoesRowSet}")); In the session bean: private CachedRowSet cuhabilitacoesRowSet; and at the init: cuhabilitacoesRowSet = new CachedRowSetImpl(); cuhabilitacoesRowSet.setDataSourceName("java:comp/env/jdbc/orirhDatasource"); cuhabilitacoesRowSet.setCommand("SELECT ALL hacod, hadesign FROM cuhabilitacoes order by 1 "); cuhabilitacoesRowSet.setTableName("cuhabilitacoes"); cuhabilitacoesRowSet.execute(); The datasource is working ok, the data is selected and a “Delete” button is working ok." Will ask Customer to provide Informix driver and database version, logs, etc.
Created attachment 42390 [details] log file
If still reproducible, please provide the Informix driver version