java.util.NoSuchElementException

Spring JIRA | Mark Serrano | 5 years ago
  1. 0

    When using the latest Spring Data JPA 1.0.0.RELEASE, my web project suddenly throws multiple exceptions of the type: {code} java.util.NoSuchElementException at java.util.AbstractList$Itr.next(AbstractList.java:350) at org.springframework.data.jpa.repository.query.JpaQueryCreator$ParameterExpressionProvider.next(JpaQueryCreator.java:314) at org.springframework.data.jpa.repository.query.JpaQueryCreator.toPredicate(JpaQueryCreator.java:213) at org.springframework.data.jpa.repository.query.JpaQueryCreator.create(JpaQueryCreator.java:103) at org.springframework.data.jpa.repository.query.JpaQueryCreator.create(JpaQueryCreator.java:50) at org.springframework.data.repository.query.parser.AbstractQueryCreator.createCriteria(AbstractQueryCreator.java:107) at org.springframework.data.repository.query.parser.AbstractQueryCreator.createQuery(AbstractQueryCreator.java:86) at org.springframework.data.jpa.repository.query.PartTreeJpaQuery$QueryPreparer.createQuery(PartTreeJpaQuery.java:145) at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.createQuery(PartTreeJpaQuery.java:78) at org.springframework.data.jpa.repository.query.JpaQueryExecution$CollectionExecution.doExecute(JpaQueryExecution.java:81) at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:55) at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:100) at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:89) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy42.findByFirstname(Unknown Source) at org.springframework.data.jpa.repository.UserRepositoryFinderTests.executesPagingMethodToListCorrectly(UserRepositoryFinderTests.java {code} It happens every 5 seconds because I have a scheduler that polls every 5 seconds. It turns out when calling the a Pageable query multiple times, this exception happens. See http://forum.springsource.org/showthread.php?113201-Spring-Data-JPA-bug Also, I have described this problem at http://forum.springsource.org/showthread.php?113598-Spring-Data-JPA-and-Spring-Data-MongoDB-Integration-Hell Even at debug level I'm not getting any reasons why this happens. But when I revert back to 1.0.0.RC1, everything works normal. No errors. Scheduler runs. Queries work as usual. Even at debug level, I ca

    Spring JIRA | 5 years ago | Mark Serrano
    java.util.NoSuchElementException
  2. 0

    When using the latest Spring Data JPA 1.0.0.RELEASE, my web project suddenly throws multiple exceptions of the type: {code} java.util.NoSuchElementException at java.util.AbstractList$Itr.next(AbstractList.java:350) at org.springframework.data.jpa.repository.query.JpaQueryCreator$ParameterExpressionProvider.next(JpaQueryCreator.java:314) at org.springframework.data.jpa.repository.query.JpaQueryCreator.toPredicate(JpaQueryCreator.java:213) at org.springframework.data.jpa.repository.query.JpaQueryCreator.create(JpaQueryCreator.java:103) at org.springframework.data.jpa.repository.query.JpaQueryCreator.create(JpaQueryCreator.java:50) at org.springframework.data.repository.query.parser.AbstractQueryCreator.createCriteria(AbstractQueryCreator.java:107) at org.springframework.data.repository.query.parser.AbstractQueryCreator.createQuery(AbstractQueryCreator.java:86) at org.springframework.data.jpa.repository.query.PartTreeJpaQuery$QueryPreparer.createQuery(PartTreeJpaQuery.java:145) at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.createQuery(PartTreeJpaQuery.java:78) at org.springframework.data.jpa.repository.query.JpaQueryExecution$CollectionExecution.doExecute(JpaQueryExecution.java:81) at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:55) at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:100) at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:89) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy42.findByFirstname(Unknown Source) at org.springframework.data.jpa.repository.UserRepositoryFinderTests.executesPagingMethodToListCorrectly(UserRepositoryFinderTests.java {code} It happens every 5 seconds because I have a scheduler that polls every 5 seconds. It turns out when calling the a Pageable query multiple times, this exception happens. See http://forum.springsource.org/showthread.php?113201-Spring-Data-JPA-bug Also, I have described this problem at http://forum.springsource.org/showthread.php?113598-Spring-Data-JPA-and-Spring-Data-MongoDB-Integration-Hell Even at debug level I'm not getting any reasons why this happens. But when I revert back to 1.0.0.RC1, everything works normal. No errors. Scheduler runs. Queries work as usual. Even at debug level, I ca

    Spring JIRA | 5 years ago | Mark Serrano
    java.util.NoSuchElementException
  3. 0

    NoSuchElementException in audit

    GitHub | 4 years ago | jshiell
    org.infernus.idea.checkstyle.exception.CheckStylePluginException: The inspection could not be executed.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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. java.util.NoSuchElementException

      No message provided

      at java.util.AbstractList$Itr.next()
    2. Java RT
      AbstractList$Itr.next
      1. java.util.AbstractList$Itr.next(AbstractList.java:350)
      1 frame
    3. Spring Data JPA
      JpaQueryCreator.create
      1. org.springframework.data.jpa.repository.query.JpaQueryCreator$ParameterExpressionProvider.next(JpaQueryCreator.java:314)
      2. org.springframework.data.jpa.repository.query.JpaQueryCreator.toPredicate(JpaQueryCreator.java:213)
      3. org.springframework.data.jpa.repository.query.JpaQueryCreator.create(JpaQueryCreator.java:103)
      4. org.springframework.data.jpa.repository.query.JpaQueryCreator.create(JpaQueryCreator.java:50)
      4 frames
    4. Spring Data Core
      AbstractQueryCreator.createQuery
      1. org.springframework.data.repository.query.parser.AbstractQueryCreator.createCriteria(AbstractQueryCreator.java:107)
      2. org.springframework.data.repository.query.parser.AbstractQueryCreator.createQuery(AbstractQueryCreator.java:86)
      2 frames
    5. Spring Data JPA
      AbstractJpaQuery.execute
      1. org.springframework.data.jpa.repository.query.PartTreeJpaQuery$QueryPreparer.createQuery(PartTreeJpaQuery.java:145)
      2. org.springframework.data.jpa.repository.query.PartTreeJpaQuery.createQuery(PartTreeJpaQuery.java:78)
      3. org.springframework.data.jpa.repository.query.JpaQueryExecution$CollectionExecution.doExecute(JpaQueryExecution.java:81)
      4. org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:55)
      5. org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:100)
      6. org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:89)
      6 frames
    6. Spring Data Core
      RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
      1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:343)
      1 frame
    7. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      1 frame
    8. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      1 frame
    9. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      1 frame
    10. Spring Tx
      PersistenceExceptionTranslationInterceptor.invoke
      1. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
      1 frame
    11. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      2 frames
    12. Unknown
      $Proxy42.findByFirstname
      1. $Proxy42.findByFirstname(Unknown Source)
      1 frame