Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task re-launch fails when using BOOT3 and Oracle #5534

Closed
MattiJH opened this issue Nov 1, 2023 · 7 comments · Fixed by #5544
Closed

Task re-launch fails when using BOOT3 and Oracle #5534

MattiJH opened this issue Nov 1, 2023 · 7 comments · Fixed by #5544
Assignees
Labels
type/bug Is a bug report
Milestone

Comments

@MattiJH
Copy link

MattiJH commented Nov 1, 2023

We are starting use SCDF to run and configure our task in our project.

During testing we noticed an issue when every single task launch after the first one fails with same error.
We get the same error from SCDF, when checking Job Executions.
Also launch builder does not show itself after the first launch. (Free-text works)

By doing cleanup or by removing pods manually everything starts working correctly, until we launch our task again.

Version
SCDF version: 1.21.1, with oracle db driver: ojdbc11-21.9.0.0 (classpath extend using these instructions)
Spring Batch: 5.0.3
Spring cloud task: 3.0.3

Task stacktrace

08:26:49.737 [main] ERROR o.s.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: Failed to execute ApplicationRunner
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:768)
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:755)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:322)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298)
	at MY.TASK.MAIN
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:95)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
Caused by: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT JOB_EXECUTION_ID, PARAMETER_NAME, PARAMETER_TYPE, PARAMETER_VALUE, IDENTIFYING
FROM BOOT3_BATCH_JOB_EXECUTION_PARAMS
WHERE JOB_EXECUTION_ID = ?
]
	at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:103)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1572)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:713)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:744)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:773)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:789)
	at org.springframework.batch.core.repository.dao.JdbcJobExecutionDao.getJobParameters(JdbcJobExecutionDao.java:475)
	at org.springframework.batch.core.repository.dao.JdbcJobExecutionDao$JobExecutionRowMapper.mapRow(JdbcJobExecutionDao.java:501)
	at org.springframework.batch.core.repository.dao.JdbcJobExecutionDao$JobExecutionRowMapper.mapRow(JdbcJobExecutionDao.java:486)
	at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:94)
	at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:61)
	at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:723)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:648)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:713)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:744)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:757)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:815)
	at org.springframework.batch.core.repository.dao.JdbcJobExecutionDao.getLastJobExecution(JdbcJobExecutionDao.java:334)
	at org.springframework.batch.core.repository.support.SimpleJobRepository.getLastJobExecution(SimpleJobRepository.java:304)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:391)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:244)
	at jdk.proxy2/jdk.proxy2.$Proxy107.getLastJobExecution(Unknown Source)
	at org.springframework.cloud.task.batch.handler.TaskJobLauncherApplicationRunner.execute(TaskJobLauncherApplicationRunner.java:123)
	at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.executeLocalJobs(JobLauncherApplicationRunner.java:195)
	at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.launchJobFromProperties(JobLauncherApplicationRunner.java:175)
	at org.springframework.cloud.task.batch.handler.TaskJobLauncherApplicationRunner.run(TaskJobLauncherApplicationRunner.java:112)
	at org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner.run(JobLauncherApplicationRunner.java:165)
	at org.springframework.cloud.task.configuration.observation.ObservationApplicationRunner.run(ObservationApplicationRunner.java:59)
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:765)
	... 13 common frames omitted
Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: "PARAMETER_VALUE": invalid identifier
	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:630)
	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:564)
	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1231)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:772)
	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:299)
	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:512)
	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:163)
	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:1010)
	at oracle.jdbc.driver.OracleStatement.prepareDefineBufferAndExecute(OracleStatement.java:1271)
	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1149)
	at oracle.jdbc.driver.OracleStatement.executeSQLSelect(OracleStatement.java:1661)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1470)
	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3761)
	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3936)
	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1102)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
	at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:722)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:648)
	... 50 common frames omitted
Caused by: oracle.jdbc.OracleDatabaseException: ORA-00904: "PARAMETER_VALUE": invalid identifier

	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:637)
	... 68 common frames omitted

SCDF stacktrace

org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT JOB_EXECUTION_ID, PARAMETER_NAME, PARAMETER_TYPE, PARAMETER_VALUE, IDENTIFYING, 'boot3' as SCHEMA_TARGET from BOOT3_BATCH_JOB_EXECUTION_PARAMS where JOB_EXECUTION_ID = ?]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00904: "PARAMETER_VALUE": invalid identifier

        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:236)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
        at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1577)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:669)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:715)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:746)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:775)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:791)
        at org.springframework.cloud.dataflow.server.repository.JdbcAggregateJobQueryDao.getJobParameters(JdbcAggregateJobQueryDao.java:549)
        at org.springframework.cloud.dataflow.server.repository.JdbcAggregateJobQueryDao.createJobExecutionFromResultSet(JdbcAggregateJobQueryDao.java:624)
        at org.springframework.cloud.dataflow.server.repository.JdbcAggregateJobQueryDao.access$000(JdbcAggregateJobQueryDao.java:79)
        at org.springframework.cloud.dataflow.server.repository.JdbcAggregateJobQueryDao$JobExecutionRowMapper.mapRow(JdbcAggregateJobQueryDao.java:706)
        at org.springframework.cloud.dataflow.server.repository.JdbcAggregateJobQueryDao$JobExecutionRowMapper.mapRow(JdbcAggregateJobQueryDao.java:697)
        at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:94)
        at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:61)
        at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:725)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:650)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:715)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:746)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:759)
        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:817)
        at org.springframework.cloud.dataflow.server.repository.JdbcAggregateJobQueryDao.queryForProvider(JdbcAggregateJobQueryDao.java:566)
        at org.springframework.cloud.dataflow.server.repository.JdbcAggregateJobQueryDao.getJobExecutionsWithStepCount(JdbcAggregateJobQueryDao.java:483)
        at org.springframework.cloud.dataflow.server.repository.JdbcAggregateJobQueryDao.listJobExecutionsWithStepCount(JdbcAggregateJobQueryDao.java:303)
        at org.springframework.cloud.dataflow.server.service.impl.DefaultTaskJobService.listJobExecutionsWithStepCount(DefaultTaskJobService.java:132)
        at org.springframework.cloud.dataflow.server.service.impl.DefaultTaskJobService$$FastClassBySpringCGLIB$$d486827e.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707)
        at org.springframework.cloud.dataflow.server.service.impl.DefaultTaskJobService$$EnhancerBySpringCGLIB$$c974b9f9.listJobExecutionsWithStepCount(<generated>)
        at org.springframework.cloud.dataflow.server.controller.JobExecutionThinController.listJobsOnly(JobExecutionThinController.java:98)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:529)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:102)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
        at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
        at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
        at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:765)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1790)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: "PARAMETER_VALUE": invalid identifier

        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:629)
        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:563)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1230)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:771)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:298)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:511)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:162)
        at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:1009)
        at oracle.jdbc.driver.OracleStatement.prepareDefineBufferAndExecute(OracleStatement.java:1270)
        at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1148)
        at oracle.jdbc.driver.OracleStatement.executeSQLSelect(OracleStatement.java:1660)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1469)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3760)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3935)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1101)
        at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
        at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
        at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:724)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:650)
        ... 92 common frames omitted
Caused by: oracle.jdbc.OracleDatabaseException: ORA-00904: "PARAMETER_VALUE": invalid identifier

        at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:636)
        ... 110 common frames omitted

SCDF launch builder
image

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Nov 1, 2023
@onobc
Copy link
Contributor

onobc commented Nov 1, 2023

Hi @MattiJH ,
Can you answer a few questions?

  1. What version of Oracle server you are running against.
  2. Are you using Flyway to manage schema (ie did you upgrade from previous SCDF version and get table updates properly?)
  3. Can you show us the table definition/schema for the BOOT3_BATCH_JOB_EXECUTION_PARAMS?

Thanks

@MattiJH
Copy link
Author

MattiJH commented Nov 2, 2023

Hi @onobc

  1. I'm testing against 18.4.0-xe
  2. Yes, we use flyway.
    We started using SCDF version 1.21.0-SNAPSHOT.
    I tried fixing the issue by deleting SCDF schema and letting flyway create it from zero with no luck
SELECT * FROM SPRING_CLOUD_DATAFLOW.BOOT3_BATCH_JOB_EXECUTION_PARAMS;

JOB_EXECUTION_ID|TYPE_CD|KEY_NAME|STRING_VAL|DATE_VAL|LONG_VAL|DOUBLE_VAL|IDENTIFYING|
----------------+-------+--------+----------+--------+--------+----------+-----------+

I checked V7-dataflow.sql and BOOT3_BATCH_JOB_EXECUTION_PARAMS should contain PARAMETER_VALUE
However it seems that flyway is running V7__Boot3_Add_Task3_Batch5_Schema.java instead
I haven't seen architecture where we use hard coded string to run flyway instead of .sql script but I'm assuming that sql commands should be identical in V7-dataflow.sql and V7__Boot3_Add_Task3_Batch5_Schema.java

https://github.com/spring-cloud/spring-cloud-dataflow/blob/main/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/db/migration/oracle/V7__Boot3_Add_Task3_Batch5_Schema.java

https://github.com/spring-cloud/spring-cloud-dataflow/blob/main/spring-cloud-dataflow-server-core/src/main/resources/schemas/oracle/V7-dataflow.sql

@onobc
Copy link
Contributor

onobc commented Nov 2, 2023

Those 2 files should be functionally kept in sync. The ones under https://github.com/spring-cloud/spring-cloud-dataflow/blob/main/spring-cloud-dataflow-server-core/src/main/resources/schemas are static and provided as a convenience for when users are not using Flyways (see here for details).

The ones under https://github.com/spring-cloud/spring-cloud-dataflow/blob/main/spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/db/migration are dynamic and used by Flyway.

They should be kept functionally in sync. It looks like we introduced a regression here.

Thank you for finding and reporting this.

As a workaround, you can replace it w/ the previous definition (in the commit link above). Otherwise, we will get it fixed asap and into the next 2.11.2 release.

We need to beef up our Oracle testing in the Boot3 area as well.

@onobc onobc removed the status/need-triage Team needs to triage and take a first look label Nov 2, 2023
@onobc onobc added this to the 2.11.2 milestone Nov 2, 2023
@MattiJH
Copy link
Author

MattiJH commented Nov 3, 2023

I set spring.profiles.active=init-oracle and it solve the issue for us.
Launch builder is still blank after first launch but we use free-text so it's not an issue for us.

@onobc
Copy link
Contributor

onobc commented Nov 3, 2023

Glad that got you going @MattiJH . Can you tell me more about this

Also launch builder does not show itself after the first launch. (Free-text works)

Could you please send a screenshot of what you are seeing when this happens?

Thank you

@cppwfs cppwfs added the type/bug Is a bug report label Nov 3, 2023
@MattiJH
Copy link
Author

MattiJH commented Nov 6, 2023

image

Freetext has some properties I set for the first launch and some values set by SCDF.

image

I noticed that when I change from builder to freetext and back builder starts to work correctly

@onobc
Copy link
Contributor

onobc commented Nov 6, 2023

Thanks @MattiJH - we will give this a deeper look. So far I have not been able to reproduce it.

@onobc onobc changed the title Task fails after first run The schema used by Flyway for BOOT3 batch job is invalid Nov 6, 2023
@onobc onobc changed the title The schema used by Flyway for BOOT3 batch job is invalid Task re-launch fails when using BOOT3 and Oracle Nov 6, 2023
onobc added a commit to onobc/spring-cloud-dataflow that referenced this issue Nov 9, 2023
This commit introduces an Oracle schema migration that updates the
BOOT3_BATCH_JOB_EXECUTION_PARAMS table to use the newer Batch5 parameter
columns.

Resolves spring-cloud#5534
onobc added a commit that referenced this issue Nov 9, 2023
* Fix columns in BOOT3_BATCH_JOB_EXECUTION_PARAMS

This commit introduces an Oracle schema migration that updates the
BOOT3_BATCH_JOB_EXECUTION_PARAMS table to use the newer Batch5 parameter
columns.

Resolves #5534

* Drop and re-add the `IDENTIFYING` column (keep same order as before)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Is a bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants