Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Weblogic 81 Thin Driver Issue

 
Rajesh Venkatesh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I get the following error when using a Updatable / Sensitive Result set
on Weblogib 81 SP5 and using thin driver with Oracle 9i -

java.sql.SQLException: Invalid operation for read only resultset: updateString
at oracle.jdbc.driver.DatabaseError.throwSqlException(Ljava/lang/String;Ljava/lang/String;I)V(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(ILjava/lang/Object;)V(DatabaseError.java:162)
at oracle.jdbc.driver.BaseResultSet.updateString(ILjava/lang/String;)V(BaseResultSet.java:258)
at oracle.jdbc.driver.OracleResultSet.updateString(Ljava/lang/String;Ljava/lang/String;)V(OracleResultSet.java:2898)
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_ScrollableResultSet.updateString(Ljava/lang/String;Ljava/lang/String;)V(Unknown Source)
at com.biperf.fsr.dao.BusinessDAOImpl.updateCharacteristicValue(Ljava/sql/ResultSet;Ljava/lang/String;Ljava/sql/Timestamp;)V(BusinessDAOImpl.java:627)
at com.biperf.fsr.dao.BusinessDAOImpl.saveProceduresPerformed(Ljava/sql/Connection;Lcom/biperf/fsr/value/BusinessInfo;)Z(BusinessDAOImpl.java:503)
at com.biperf.fsr.dao.BusinessDAOImpl.saveBusinessData(Lcom/biperf/fsr/value/BusinessInfo;)V(BusinessDAOImpl.java:424)
at com.biperf.fsr.action.BusinessAction.save(Lcom/biperf/fsr/value/BusinessInfo;Ljavax/servlet/http/HttpServletRequest;)V(BusinessAction.java:282)

I have pasted the code below -

pstmt = con.prepareStatement( PERFORMED_PROCEDURES_SELECT ,
ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE );
pstmt.setString( 1, busInfo.getParticipantId() );
rs = pstmt.executeQuery();

long time = ( new java.util.Date()).getTime();
java.sql.Timestamp tstamp = new java.sql.Timestamp( time );
String participantId = getMasterPaxId( con, busInfo.getParticipantId() );
while( rs.next() )
{
String characteristic_value = rs.getString("CHARACTERISTIC_VALUE");
if ( null == checked.get( characteristic_value ) )
{
//set it inactive
rs.updateString("PARTICIPANT_ID", participantId );
rs.updateString("STATUS", INACTIVE );
rs.updateString("MODIFIED_BY", participantId );
rs.updateTimestamp("DATE_STATUS", tstamp );
rs.updateTimestamp("DATE_MODIFIED", tstamp );
rs.updateRow();
}
else
{
//remove it; it's already checked no changes
checked.remove( characteristic_value );
}
}

The query being executed is -
SELECT status,
date_status,
characteristic_value,
char_id,
characteristic_type,
modified_by,
date_modified,
participant_id
FROM PAX_CHARACTERISTIC
WHERE participant_id = (select MASTER_PAX_ID
from participant
where participant_id = ?)
AND characteristic_type='PROC_PERF'
AND status = 'A' ;

Anyone faced a similiar error or got a solution, please do let me know ?

[ June 26, 2007: Message edited by: Rajesh Venkatesh ]
[ June 26, 2007: Message edited by: Rajesh Venkatesh ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajesh,
Does your driver support updateable result sets?
 
Rajesh Venkatesh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne

Yes the driver does support Updateable result set.

There is another query which works just fine with updateable result set -
SELECT D.*
FROM delegate_user D
WHERE D.DELEGATE_USER_ID = ?

Rajesh.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic