Jun 4th, 2009, 02:30 PM
When I am trying to execute two taskletstep under a tasklet job, I am getting the below exception. Even I didn't create any table BATCH_STEP_EXECUTION. It was worked well for a single tasklet step earlier, now that also not. Any one help plz....................
(step.AbstractStep 183 ) Encountered an error executing the step
(xml.XmlBeanDefinitionReader 323 ) Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
(support.SQLErrorCodesFactory 128 ) SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
(step.AbstractStep 216 ) Encountered an error saving batch meta data.This job is now in an unknown state and should not be restarted.
org.springframework.jdbc.UncategorizedSQLException : PreparedStatementCallback; uncategorized SQLException for SQL [INSERT into BATCH_STEP_EXECUTION(STEP_EXECUTION_ID, VERSION, STEP_NAME, JOB_EXECUTION_ID, START_TIME, END_TIME, STATUS, COMMIT_COUNT, ITEM_COUNT, CONTINUABLE, EXIT_CODE, EXIT_MESSAGE) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; SQL state ; error code ; ORA-01461: can bind a LONG value only for insert into a LONG column
; nested exception is java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
at org.springframework.jdbc.support.SQLStateSQLExcept ionTranslator.translate(SQLStateSQLExceptionTransl ator.java:124)
Last edited by premsoft; Jun 5th, 2009 at 11:15 AM.
Jun 5th, 2009, 01:45 AM
What version of Spring Batch are you using?
Jun 5th, 2009, 11:05 AM
Spring batch 1.0.1..
Lots of existing programs running in my project runs fine with the current spring batch version and even I didn't encounter this issue earlier. And also the step execution id and job execution id in the BATCH_STEP_EXECUTION are nearly 3000, This looks fine also. So, I am thinking error might be problem of id generation.
Any specific reason behind this?
And any change in the version, batch meta tables changed. So I have to create a separate set of tables for the new programs. For this my tech team won't agree on this.
Do you have any other solution other than changing the version?
Last edited by premsoft; Jun 5th, 2009 at 11:31 AM.
Jun 5th, 2009, 12:00 PM
It's probably an overflow in one of the VARCHAR columns (most likely EXIT_MESSAGE). You could try increasing the column sizes. Double it if you can.
Jun 5th, 2009, 12:55 PM
My SQL exception is
ORA-01461: can bind a LONG value only for insert into a LONG column
So, mostly related to Number data type..
Is it anyway to intercept the insertion of BATCH_STEP_EXECUTION, and see the exactly what parameters going on....
Jun 5th, 2009, 01:03 PM
You can try printing it out from an AfterStep method.
Jun 6th, 2009, 03:18 AM
I could be wrong but I think "LONG" means "long char data (VARCHAR2)". Anyway you can probably see what's in the step execution by looking at DEBUG level logging for org.springframework.batch.core or org.springframework.batch.core.step.