my dog learned polymorphism*
The moose likes JDBC and the fly likes Weblogic 81 Thin Driver Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Weblogic 81 Thin Driver Issue" Watch "Weblogic 81 Thin Driver Issue" New topic
Author

Weblogic 81 Thin Driver Issue

Rajesh Venkatesh
Greenhorn

Joined: Feb 14, 2002
Posts: 21
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

Rajesh,
Does your driver support updateable result sets?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Rajesh Venkatesh
Greenhorn

Joined: Feb 14, 2002
Posts: 21
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Weblogic 81 Thin Driver Issue