org.springframework.dao.InvalidDataAccessApiUsageException: sql must be non-null.; nested exception is java.lang.IllegalArgumentException: sql must be non-null.

Stack Overflow | Thiago Negri | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Hibernate AbstractBatchImpl sql must be non-null

    Stack Overflow | 6 months ago | Thiago Negri
    org.springframework.dao.InvalidDataAccessApiUsageException: sql must be non-null.; nested exception is java.lang.IllegalArgumentException: sql must be non-null.
  2. 0

    Hibernate Exception: java.lang.IllegalArgumentException: Unknown name value [] for enum class

    Stack Overflow | 3 years ago | Prathik Puthran
    java.lang.IllegalArgumentException: Unknown name value [] for enum class [model.enums.PeriodUnit]
  3. 0

    Hibernate Exception: java.lang.IllegalArgumentException: Unknown name value [] for enum class - scriptscoop.com

    scriptscoop.com | 1 year ago
    java.lang.IllegalArgumentException: Unknown name value [] for enum class [model.enums.PeriodUnit]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JPA AttributeConverter not honored in a Spring-data/hibernate query when used in a composite key

    Stack Overflow | 12 months ago | IsenGrim
    org.springframework.dao.InvalidDataAccessApiUsageException: Unknown name value [FOO] for enum class [FooBarType]; nested exception is java.lang.IllegalArgumentException: Unknown name value [FOO] for enum class [FooBarType]

    1 unregistered visitors

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      sql must be non-null.

      at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.getBatchStatement()
    2. Hibernate
      QueryImpl.list
      1. org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.getBatchStatement(AbstractBatchImpl.java:121)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      2. org.hibernate.engine.jdbc.batch.internal.BatchingBatch.getBatchStatement(BatchingBatch.java:63)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      3. org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3049)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      4. org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2985)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      5. org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3365)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      6. org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      7. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      8. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      9. org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      10. org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:50)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      11. org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1264)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      12. org.hibernate.internal.SessionImpl.list(SessionImpl.java:1332)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      13. org.hibernate.internal.QueryImpl.list(QueryImpl.java:87)[hibernate-core-5.1.0.Final.jar!/:5.1.0.Final]
      13 frames
    3. org.hibernate.jpa
      QueryImpl.getSingleResult
      1. org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606)[hibernate-entitymanager-5.1.0.Final.jar!/:5.1.0.Final]
      2. org.hibernate.jpa.internal.QueryImpl.getSingleResult(QueryImpl.java:529)[hibernate-entitymanager-5.1.0.Final.jar!/:5.1.0.Final]
      2 frames
    4. Spring Data JPA
      AbstractJpaQuery.execute
      1. org.springframework.data.jpa.repository.query.JpaQueryExecution$SingleEntityExecution.doExecute(JpaQueryExecution.java:206)[spring-data-jpa-1.9.4.RELEASE.jar!/:na]
      2. org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:78)[spring-data-jpa-1.9.4.RELEASE.jar!/:na]
      3. org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:100)[spring-data-jpa-1.9.4.RELEASE.jar!/:na]
      4. org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:91)[spring-data-jpa-1.9.4.RELEASE.jar!/:na]
      4 frames
    5. Spring Data Core
      RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
      1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:462)[spring-data-commons-1.11.4.RELEASE.jar!/:na]
      2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:440)[spring-data-commons-1.11.4.RELEASE.jar!/:na]
      2 frames
    6. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      1 frame
    7. org.springframework.data
      DefaultMethodInvokingMethodInterceptor.invoke
      1. org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61)[spring-data-commons-1.11.4.RELEASE.jar!/:na]
      1 frame
    8. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      1 frame
    9. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      3 frames
    10. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      1 frame
    11. Spring Tx
      PersistenceExceptionTranslationInterceptor.invoke
      1. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      1 frame
    12. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      1 frame
    13. Spring Data JPA
      CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke
      1. org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:131)[spring-data-jpa-1.9.4.RELEASE.jar!/:na]
      1 frame
    14. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      4. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      4 frames
    15. com.sun.proxy
      $Proxy236.findByUpcAndOrganizationId
      1. com.sun.proxy.$Proxy236.findByUpcAndOrganizationId(Unknown Source)[na:na]
      1 frame
    16. com.foobar
      ProductWriter$$FastClassBySpringCGLIB$$7655e79a.invoke
      1. com.foobar.ProductWriter.write(ProductWriter.java:53)[data-integration-2.1-SNAPSHOT.jar!/:na]
      2. com.foobar.ProductWriter$$FastClassBySpringCGLIB$$7655e79a.invoke(<generated>)[data-integration-2.1-SNAPSHOT.jar!/:na]
      2 frames
    17. Spring Core
      MethodProxy.invoke
      1. org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)[spring-core-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      1 frame
    18. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      2 frames
    19. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      3 frames
    20. Spring AOP
      CglibAopProxy$DynamicAdvisedInterceptor.intercept
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      2. org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      2 frames
    21. com.foobar
      ProductWriter$$EnhancerBySpringCGLIB$$f76d35cb.write
      1. com.foobar.ProductWriter$$EnhancerBySpringCGLIB$$f76d35cb.write(<generated>)[data-integration-2.1-SNAPSHOT.jar!/:na]
      1 frame
    22. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor2081.invoke(Unknown Source)[na:na]
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_72]
      3. java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_72]
      3 frames
    23. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      4. org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      5. org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      6. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      7. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)[spring-aop-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      7 frames
    24. com.sun.proxy
      $Proxy328.write
      1. com.sun.proxy.$Proxy328.write(Unknown Source)[na:na]
      1 frame
    25. Spring Batch Core
      TaskletStep$ChunkTransactionCallback.doInTransaction
      1. org.springframework.batch.core.step.item.SimpleChunkProcessor.writeItems(SimpleChunkProcessor.java:175)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      2. org.springframework.batch.core.step.item.SimpleChunkProcessor.doWrite(SimpleChunkProcessor.java:151)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      3. org.springframework.batch.core.step.item.SimpleChunkProcessor.write(SimpleChunkProcessor.java:274)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      4. org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:199)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      5. org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:75)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      6. org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      7. org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      7 frames
    26. Spring Tx
      TransactionTemplate.execute
      1. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
      1 frame
    27. Spring Batch Core
      StepContextRepeatCallback.doInIteration
      1. org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      2. org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      2 frames
    28. Spring Batch Infrastructure
      RepeatTemplate.iterate
      1. org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)[spring-batch-infrastructure-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      2. org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)[spring-batch-infrastructure-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      3. org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)[spring-batch-infrastructure-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      3 frames
    29. Spring Batch Core
      SimpleJobLauncher$1.run
      1. org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      2. org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      3. org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      4. org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      5. org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      6. org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      7. org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      8. org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      9. org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      10. org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)[spring-batch-core-3.0.7.RELEASE.jar!/:3.0.7.RELEASE]
      10 frames
    30. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_72]
      1 frame