aspose file tools*
The moose likes JDBC and the fly likes JDBC Oracle Error ORA-01461 while doing batch update Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Oracle Error ORA-01461 while doing batch update" Watch "JDBC Oracle Error ORA-01461 while doing batch update" New topic
Author

JDBC Oracle Error ORA-01461 while doing batch update

Aakash Parashar
Ranch Hand

Joined: Jul 25, 2005
Posts: 123

Hi Forum,

I got Oracle Error ORA-01461 in my prod server only once recently while doing batch update of records in Oracle. Although simultaneously there were many processing were going on, only one processing failed, rest of other similar processes passed in server without this error. Oracle version is 10.2.0.3.0

I browsed my forums regarding this but not getting concrete answere, somebody talks about character set, but this does not seems to be problem because we are inserting normal alphabets and number within the length limit of DB Column lenghts. Our application is runnig since 4 years and we got this issue first time.



Your's Aakash
SCJP 1.4 96%, SCBCD 1.3 94%, http://java-application-programming.blogspot.in
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3611
    
  60

The Oracle error code suggest you're trying to insert or bind a LONG datatype into something which isn't a LONG.

I don't think anyone will be able to help unless you TellTheDetails. You should probably post the code which caused the error.
Aakash Parashar
Ranch Hand

Joined: Jul 25, 2005
Posts: 123

Inlining the exception trace. ITs not related to LONG data type because we insert all columns as Varchar.

15-Aug 16:13:54.0530| FATAL | [Default : 0] | com.polaris.iph.file.workflow.helper.FileWFManagerHelper:txnBatchForward
(818) | txnBatchForward() | SQLException while inserting Batch & Txns
java.sql.BatchUpdateException: ORA-01461: can bind a LONG value only for insert into a LONG column at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException
(DatabaseError.java(Compiled Code))
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch
(OraclePreparedStatement.java(Compiled Code)) at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteBatch
(WSJdbcStatement.java:1173)
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch
(WSJdbcStatement.java:516)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC Oracle Error ORA-01461 while doing batch update