You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
Launching step fails with the following error:
Could not obtain sequence value; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "BATCH_JOB_SEQ.NEXTVAL" not found; SQL statement:
select BATCH_JOB_SEQ.nextval from dual [42122-206]
org.springframework.dao.DataAccessResourceFailureException: Could not obtain sequence value; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "BATCH_JOB_SEQ.NEXTVAL" not found; SQL statement:
select BATCH_JOB_SEQ.nextval from dual [42122-206]
at app//org.springframework.jdbc.support.incrementer.AbstractSequenceMaxValueIncrementer.getNextKey(AbstractSequenceMaxValueIncrementer.java:79)
at app//org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer.nextLongValue(AbstractDataFieldMaxValueIncrementer.java:128)
at app//org.springframework.batch.core.repository.dao.JdbcJobInstanceDao.createJobInstance(JdbcJobInstanceDao.java:113)
at app//org.springframework.batch.core.repository.support.SimpleJobRepository.createJobExecution(SimpleJobRepository.java:148)
at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at [email protected]/java.lang.reflect.Method.invoke(Method.java:564)
at app//org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at app//org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at app//org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at app//org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at app//org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at app//org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at app//org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at app//org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean$1.invoke(AbstractJobRepositoryFactoryBean.java:181)
at app//org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at app//org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at app//com.sun.proxy.$Proxy163.createJobExecution(Unknown Source)
at app//org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:137)
at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at [email protected]/java.lang.reflect.Method.invoke(Method.java:564)
at app//org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at app//org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at app//org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at app//org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:128)
at app//org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at app//org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at app//com.sun.proxy.$Proxy166.run(Unknown Source)
at app//org.springframework.batch.test.StepRunner.launchJob(StepRunner.java:172)
at app//org.springframework.batch.test.StepRunner.launchStep(StepRunner.java:161)
at app//org.springframework.batch.test.JobLauncherTestUtils.launchStep(JobLauncherTestUtils.java:251)
at app//org.springframework.batch.test.JobLauncherTestUtils.launchStep(JobLauncherTestUtils.java:225)
Environment
Spring Batch 4.3.3
Java 15
H2 2.0.206
Steps to reproduce
Run Spring Batch with H2 v2.x database
Thank you for opening this issue.
This issue has been resolved in the current main branch here
It will be backported to the 4.3.5 release as discussed here
I will close, please re-open if you feel it was closed by mistake.
Bug description
Launching step fails with the following error:
Environment
Spring Batch 4.3.3
Java 15
H2 2.0.206
Steps to reproduce
Run Spring Batch with H2 v2.x database
Expected behavior
Spring Batch works normally with H2 versions without RCE flaw (https://jfrog.com/blog/the-jndi-strikes-back-unauthenticated-rce-in-h2-database-console/)
Minimal Complete Reproducible example
Take this project as the base: https://github.com/spring-guides/gs-batch-processing/tree/main/complete
Perform the following modifications:
/org/springframework/batch/core/schema-postgresql.sql
from the spring-batch-core jar and put it under resources folder asschema.sql
.Build and run the application.
P.S. Using
schema-h2.sql
does not work. I assume it is a separate issue.The text was updated successfully, but these errors were encountered: