• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring batch 2.0 (How to stop calling sequence)

 
Kousik Majumder
Ranch Hand
Posts: 237
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am trying to run Spring batch 2.0 examples.But it is getting an error for not creating sequence. Can anybody tell me how can I stop my batch to call creating DB Sequence? Beacuse I have no permission to create a DB sequence.
Is it mandatory for Spring Batch to create a DB sequence to run? Can not I skip this step?
If there is any alternate way please tell that with codes.

Error StackTrace:-

Oct 1, 2010 8:39:22 PM org.springframework.batch.core.launch.support.Comm andLineJobRunner start
SEVERE: Job Terminated in error:
org.springframework.dao.DataAccessResourceFailureE xception: Could not obtain sequence value; nested exception is java
.sql.SQLException: ORA-02289: sequence does not exist

at org.springframework.jdbc.support.incrementer.Abstr actSequenceMaxValueIncrementer.getNextKey(Abstract Sequen
ceMaxValueIncrementer.java:78)
at org.springframework.jdbc.support.incrementer.Abstr actDataFieldMaxValueIncrementer.nextLongValue(Abst ractDa
taFieldMaxValueIncrementer.java:125)
at org.springframework.batch.core.repository.dao.Jdbc JobInstanceDao.createJobInstance(JdbcJobInstanceDa o.java
:110)
at org.springframework.batch.core.repository.support. SimpleJobRepository.createJobExecution(SimpleJobRe posito
ry.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.ja
va:182)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)
at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:106)

at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy0.createJobExecution(Unknown Source)
at org.springframework.batch.core.launch.support.Simp leJobLauncher.run(SimpleJobLauncher.java:102)
at org.springframework.batch.core.launch.support.Comm andLineJobRunner.start(CommandLineJobRunner.java:2 07)
at org.springframework.batch.core.launch.support.Comm andLineJobRunner.main(CommandLineJobRunner.java:25 4)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJava Mojo.java:271)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: ORA-02289: sequence does not exist

at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java: 623)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStateme nt.java:112)
at oracle.jdbc.driver.T4CStatement.execute_for_descri be(T4CStatement.java:351)
at oracle.jdbc.driver.OracleStatement.execute_maybe_d escribe(OracleStatement.java:896)
at oracle.jdbc.driver.T4CStatement.execute_maybe_desc ribe(T4CStatement.java:383)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:986)
at oracle.jdbc.driver.OracleStatement.executeQuery(Or acleStatement.java:1125)
at org.apache.commons.dbcp.DelegatingStatement.execut eQuery(DelegatingStatement.java:208)
at org.springframework.jdbc.support.incrementer.Abstr actSequenceMaxValueIncrementer.getNextKey(Abstract Sequen
ceMaxValueIncrementer.java:69)
... 23 more
Oct 1, 2010 8:39:22 PM org.springframework.context.support.AbstractApplic ationContext doClose
INFO: Closing org.springframework.context.support.ClassPathXmlAp plicationContext@61736e: display name [org.springfram
ework.context.support.ClassPathXmlApplicationConte xt@61736e]; startup date [Fri Oct 01 20:39:08 IST 2010]; root of co
ntext hierarchy
Oct 1, 2010 8:39:22 PM org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@1381960: defining
beans [jobLauncher,org.springframework.batch.core.configu ration.support.JobRegistryBeanPostProcessor#0,jobR epository
,jobOperator,jobExplorer,jobRegistry,jdbcTemplate, logAdvice,eventAdvice,dataSource,transactionManager,environment,ove
rrideProperties,placeholderProperties,org.springfr amework.batch.core.scope.internalStepScope,org.spr ingframework.bean
s.factory.config.CustomEditorConfigurer,fetchRecor d,counterJob,inputMemberSource,opWriter]; root of factory hierarchy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic