org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [insert into people (first_name, last_name) values (?, ?)]; nested exception is java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: PEOPLE

Coderanch | Rajesh Santhanakrishnan | 1 year ago
  1. 0

    "user lacks privilege or object not found" error while running spring batch service

    Coderanch | 1 year ago | Rajesh Santhanakrishnan
    org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [insert into people (first_name, last_name) values (?, ?)]; nested exception is java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: PEOPLE
  2. 0

    JDBC sink: can't insert data

    GitHub | 7 months ago | nurgasemetey
    org.springframework.messaging.MessageHandlingException: error occurred in message handler [jdbcMessageHandler]; nested exception is org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [INSERT INTO names(name) VALUES (?)]; nested exception is java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: NAMES
  3. 0

    Hibernate HSQLDB - could not prepare statement

    Stack Overflow | 5 months ago | jodekpotasu
    java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: USERS in statement [insert into Users (id, avatar, email, login, password) values (default, ?, ?, ?, ?)]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring @TestExecutionListeners failing on JPA Schema generation

    Stack Overflow | 2 years ago
    java.lang.IllegalArgumentException: Check JPQL for query select r.id from com.sw.system4.data.geo.Region r where r.area='GB'
  6. 0

    HSQLDB: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found

    Stack Overflow | 2 years ago | noob
    java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: USER. I found that in my file store script the code for the PRODUCT table create was there however I have created the USER table the same way I did with the PRODUCT table - using the HSQL Database Manager. This is my error code: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: USER
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.hsqldb.HsqlException

    user lacks privilege or object not found: PEOPLE

    at org.hsqldb.error.Error.error()
  2. HyperSQL Database
    Error.error
    1. org.hsqldb.error.Error.error(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    2. org.hsqldb.error.Error.error(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    2 frames
  3. HSQLDB
    JDBCConnection.prepareStatement
    1. org.hsqldb.ParserDQL.readTableName(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    2. org.hsqldb.ParserDQL.readRangeVariableForDataChange(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    3. org.hsqldb.ParserDML.compileInsertStatement(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    4. org.hsqldb.ParserCommand.compilePart(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    5. org.hsqldb.ParserCommand.compileStatement(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    6. org.hsqldb.Session.compileStatement(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    7. org.hsqldb.StatementManager.compile(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    8. org.hsqldb.Session.execute(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    9. org.hsqldb.jdbc.JDBCPreparedStatement.<init>(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    10. org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)[hsqldb-2.3.3.jar:2.3.3]
    10 frames
  4. Spring Framework
    NamedParameterJdbcTemplate.batchUpdate
    1. org.springframework.jdbc.core.JdbcTemplate$SimplePreparedStatementCreator.createPreparedStatement(JdbcTemplate.java:1516)[spring-jdbc-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:623)[spring-jdbc-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    3. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)[spring-jdbc-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    4. org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.java:946)[spring-jdbc-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    5. org.springframework.jdbc.core.namedparam.NamedParameterBatchUpdateUtils.executeBatchUpdateWithNamedParameters(NamedParameterBatchUpdateUtils.java:40)[spring-jdbc-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    6. org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.batchUpdate(NamedParameterJdbcTemplate.java:335)[spring-jdbc-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    6 frames
  5. Spring Batch Infrastructure
    JdbcBatchItemWriter.write
    1. org.springframework.batch.item.database.JdbcBatchItemWriter.write(JdbcBatchItemWriter.java:181)[spring-batch-infrastructure-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    1 frame
  6. Spring Batch Core
    TaskletStep$ChunkTransactionCallback.doInTransaction
    1. org.springframework.batch.core.step.item.SimpleChunkProcessor.writeItems(SimpleChunkProcessor.java:175)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    2. org.springframework.batch.core.step.item.SimpleChunkProcessor.doWrite(SimpleChunkProcessor.java:151)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    3. org.springframework.batch.core.step.item.SimpleChunkProcessor.write(SimpleChunkProcessor.java:274)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    4. org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:199)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    5. org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:75)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    6. org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    7. org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    7 frames
  7. Spring Tx
    TransactionTemplate.execute
    1. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)[spring-tx-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    1 frame
  8. Spring Batch Core
    StepContextRepeatCallback.doInIteration
    1. org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    2. org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    2 frames
  9. Spring Batch Infrastructure
    RepeatTemplate.iterate
    1. org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)[spring-batch-infrastructure-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    2. org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)[spring-batch-infrastructure-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    3. org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)[spring-batch-infrastructure-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    3 frames
  10. Spring Batch Core
    SimpleJobLauncher$1.run
    1. org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    2. org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    3. org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    4. org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    5. org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    6. org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    7. org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    8. org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    9. org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    10. org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    10 frames
  11. Spring Core
    SyncTaskExecutor.execute
    1. org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    1 frame
  12. Spring Batch Core
    SimpleJobLauncher.run
    1. org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    1 frame
  13. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_51]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_51]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_51]
    4. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_51]
    4 frames
  14. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    3 frames
  15. Spring Batch Core
    SimpleBatchConfiguration$PassthruAdvice.invoke
    1. org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:127)[spring-batch-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    1 frame
  16. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2 frames
  17. com.sun.proxy
    $Proxy34.run
    1. com.sun.proxy.$Proxy34.run(Unknown Source)[na:na]
    1 frame
  18. Spring Boot AutoConfigure
    JobLauncherCommandLineRunner.run
    1. org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.execute(JobLauncherCommandLineRunner.java:215)[spring-boot-autoconfigure-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    2. org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.executeLocalJobs(JobLauncherCommandLineRunner.java:232)[spring-boot-autoconfigure-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    3. org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.launchJobFromProperties(JobLauncherCommandLineRunner.java:124)[spring-boot-autoconfigure-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    4. org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.run(JobLauncherCommandLineRunner.java:118)[spring-boot-autoconfigure-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    4 frames
  19. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:792)[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    2. org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:776)[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    3. org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:763)[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    4. org.springframework.boot.SpringApplication.doRun(SpringApplication.java:356)[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:295)[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1112)[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    7. org.springframework.boot.SpringApplication.run(SpringApplication.java:1101)[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    7 frames
  20. batchservice
    App.main
    1. batchservice.App.main(App.java:10)[classes/:na]
    1 frame