org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT JOB_INSTANCE_ID, JOB_NAME from BATCH_JOB_INSTANCE where JOB_NAME = ? order by JOB_INSTANCE_ID desc]; nested exception is java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
0
votes
maybe you don't have access and/or you need to define the schema. Take a look at forum.spring.io/forum/spring-projects/batch/…
- Graciano
I am able to access the database through jpa in the same project so i think access is not the issue , and i am using the spring starter project for creating spring batch configuration so i am not aware how i could define the default table schema and all.
- user3758858
Ask DBA set default schema for the user name you are using to connect to DB.
- Nghia Do
1 Answers
0
votes
I guess you may need to edit you xml config file
<bean id="jobRepository"
class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean"
p:dataSource-ref="dataSource" p:transactionManager-ref="transactionManager"
p:tablePrefix="MYDB.BATCH_"/>
MYDB been your schema Source