java.util.NoSuchElementException

Hibernate JIRA | Chandra | 10 years 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

    I added following two classes (TvProgram and TvProgramIdClass) in org.hibernate.test.annotations.cid package. And added two test cases to org.hibernate.test.annotations.cid.CompositeIdTest. See testSecondaryTableWithCompositeId and testSecondaryTableWithIdClass methods in attached fi The test cases fail with following output. However, if I remove SecondaryTable and secondary table @Column, test cases pass. 12:43:15,534 INFO Version:15 - Hibernate Annotations 3.3.0.GA 12:43:15,550 INFO Environment:509 - Hibernate 3.2.3 12:43:15,565 INFO Environment:527 - loaded properties from resource hibernate.properties: {hibernate.connection.password=****, hibernate.jdbc.batch_versioned_data=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.cache.region_prefix=hibernate.test, hibernate.proxool.pool_alias=pool1, hibernate.bytecode.use_reflection_optimizer=false, hibernate.default_batch_fetch_size=100, hibernate.cache.use_query_cache=true, hibernate.jdbc.use_streams_for_binary=true, hibernate.max_fetch_depth=1, hibernate.format_sql=true, hibernate.connection.pool_size=1, hibernate.connection.username=sa, hibernate.connection.driver_class=org.hsqldb.jdbcDriver, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.order_updates=true, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.connection.url=jdbc:hsqldb:.} 12:43:15,565 INFO Environment:558 - using java.io streams to persist binary types 12:43:15,581 INFO Environment:676 - Bytecode provider name : cglib 12:43:15,581 INFO Environment:593 - using JDK 1.4 java.sql.Timestamp handling 12:43:15,675 INFO Dialect:152 - Using dialect: org.hibernate.dialect.HSQLDialect 12:43:15,815 INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.Parent 12:43:15,862 INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.Parent on table Parent 12:43:15,894 INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.Child 12:43:15,909 INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.Child on table Child 12:43:15,925 INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.Channel 12:43:15,925 INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.Channel on table Channel 12:43:15,941 INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.TvMagazin 12:43:15,941 INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.TvMagazin on table TvMagazin 12:43:15,941 INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.TvProgramIdClass 12:43:15,941 INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.TvProgramIdClass on table TvProgramIdClass 12:43:15,956 INFO EntityBinder:631 - Adding secondary table to entity org.hibernate.test.annotations.cid.TvProgramIdClass -> TV_PROGRAM_IDCLASS java.util.NoSuchElementException at java.util.AbstractList$Itr.next(AbstractList.java:427) at org.hibernate.util.JoinedIterator.next(JoinedIterator.java:53) at org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumn(Ejb3JoinColumn.java:210) at org.hibernate.cfg.annotations.EntityBinder.createPrimaryColumnsToSecondaryTable(EntityBinder.java:483) at org.hibernate.cfg.annotations.EntityBinder.finalSecondaryTableBinding(EntityBinder.java:440) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:770) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915) at org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:51) at org.hibernate.test.annotations.TestCase.setUp(TestCase.java:61) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.textui.TestRunner.doRun(TestRunner.java:116) at com.intellij.rt.execution.junit.IdeaTestRunner.doRun(IdeaTestRunner.java:65) at junit.textui.TestRunner.doRun(TestRunner.java:109) at com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:24) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) java.util.NoSuchElementException at java.util.AbstractList$Itr.next(AbstractList.java:427) at org.hibernate.util.JoinedIterator.next(JoinedIterator.java:53) at org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumn(Ejb3JoinColumn.java:210) at org.hibernate.cfg.annotations.EntityBinder.createPrimaryColumnsToSecondaryTable(EntityBinder.java:483) at org.hibernate.cfg.annotations.EntityBinder.finalSecondaryTableBinding(EntityBinder.java:440) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:770) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915) at org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:51) at org.hibernate.test.annotations.TestCase.setUp(TestCase.java:61) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

    Hibernate JIRA | 10 years ago | Chandra
    java.util.NoSuchElementException
  2. 0

    I added following two classes (TvProgram and TvProgramIdClass) in org.hibernate.test.annotations.cid package. And added two test cases to org.hibernate.test.annotations.cid.CompositeIdTest. See testSecondaryTableWithCompositeId and testSecondaryTableWithIdClass methods in attached fi The test cases fail with following output. However, if I remove SecondaryTable and secondary table @Column, test cases pass. 12:43:15,534 INFO Version:15 - Hibernate Annotations 3.3.0.GA 12:43:15,550 INFO Environment:509 - Hibernate 3.2.3 12:43:15,565 INFO Environment:527 - loaded properties from resource hibernate.properties: {hibernate.connection.password=****, hibernate.jdbc.batch_versioned_data=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N', hibernate.cache.region_prefix=hibernate.test, hibernate.proxool.pool_alias=pool1, hibernate.bytecode.use_reflection_optimizer=false, hibernate.default_batch_fetch_size=100, hibernate.cache.use_query_cache=true, hibernate.jdbc.use_streams_for_binary=true, hibernate.max_fetch_depth=1, hibernate.format_sql=true, hibernate.connection.pool_size=1, hibernate.connection.username=sa, hibernate.connection.driver_class=org.hsqldb.jdbcDriver, hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.order_updates=true, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.connection.url=jdbc:hsqldb:.} 12:43:15,565 INFO Environment:558 - using java.io streams to persist binary types 12:43:15,581 INFO Environment:676 - Bytecode provider name : cglib 12:43:15,581 INFO Environment:593 - using JDK 1.4 java.sql.Timestamp handling 12:43:15,675 INFO Dialect:152 - Using dialect: org.hibernate.dialect.HSQLDialect 12:43:15,815 INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.Parent 12:43:15,862 INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.Parent on table Parent 12:43:15,894 INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.Child 12:43:15,909 INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.Child on table Child 12:43:15,925 INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.Channel 12:43:15,925 INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.Channel on table Channel 12:43:15,941 INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.TvMagazin 12:43:15,941 INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.TvMagazin on table TvMagazin 12:43:15,941 INFO AnnotationBinder:398 - Binding entity from annotated class: org.hibernate.test.annotations.cid.TvProgramIdClass 12:43:15,941 INFO EntityBinder:420 - Bind entity org.hibernate.test.annotations.cid.TvProgramIdClass on table TvProgramIdClass 12:43:15,956 INFO EntityBinder:631 - Adding secondary table to entity org.hibernate.test.annotations.cid.TvProgramIdClass -> TV_PROGRAM_IDCLASS java.util.NoSuchElementException at java.util.AbstractList$Itr.next(AbstractList.java:427) at org.hibernate.util.JoinedIterator.next(JoinedIterator.java:53) at org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumn(Ejb3JoinColumn.java:210) at org.hibernate.cfg.annotations.EntityBinder.createPrimaryColumnsToSecondaryTable(EntityBinder.java:483) at org.hibernate.cfg.annotations.EntityBinder.finalSecondaryTableBinding(EntityBinder.java:440) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:770) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915) at org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:51) at org.hibernate.test.annotations.TestCase.setUp(TestCase.java:61) at junit.framework.TestCase.runBare(TestCase.java:125) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.textui.TestRunner.doRun(TestRunner.java:116) at com.intellij.rt.execution.junit.IdeaTestRunner.doRun(IdeaTestRunner.java:65) at junit.textui.TestRunner.doRun(TestRunner.java:109) at com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:24) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) java.util.NoSuchElementException at java.util.AbstractList$Itr.next(AbstractList.java:427) at org.hibernate.util.JoinedIterator.next(JoinedIterator.java:53) at org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumn(Ejb3JoinColumn.java:210) at org.hibernate.cfg.annotations.EntityBinder.createPrimaryColumnsToSecondaryTable(EntityBinder.java:483) at org.hibernate.cfg.annotations.EntityBinder.finalSecondaryTableBinding(EntityBinder.java:440) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:770) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915) at org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:51) at org.hibernate.test.annotations.TestCase.setUp(TestCase.java:61) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

    Hibernate JIRA | 10 years ago | Chandra
    java.util.NoSuchElementException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    #1480977 - Pastie

    pastie.org | 1 year ago
    org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException role: org.apache.maven.artifact.resolver.ArtifactResolver roleHint: project-cache-aware
  5. 0

    random exception

    java.net Bugzilla | 6 years ago | strubin
    java.util.NoSuchElementException

    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:427)
      1 frame
    3. Hibernate
      JoinedIterator.next
      1. org.hibernate.util.JoinedIterator.next(JoinedIterator.java:53)
      1 frame
    4. Hibernate
      AnnotationConfiguration.buildSessionFactory
      1. org.hibernate.cfg.Ejb3JoinColumn.buildJoinColumn(Ejb3JoinColumn.java:210)
      2. org.hibernate.cfg.annotations.EntityBinder.createPrimaryColumnsToSecondaryTable(EntityBinder.java:483)
      3. org.hibernate.cfg.annotations.EntityBinder.finalSecondaryTableBinding(EntityBinder.java:440)
      4. org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:770)
      5. org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498)
      6. org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277)
      7. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
      8. org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
      8 frames
    5. org.hibernate.test
      TestCase.setUp
      1. org.hibernate.test.annotations.TestCase.buildSessionFactory(TestCase.java:51)
      2. org.hibernate.test.annotations.TestCase.setUp(TestCase.java:61)
      2 frames
    6. JUnit
      TestRunner.doRun
      1. junit.framework.TestCase.runBare(TestCase.java:125)
      2. junit.framework.TestResult$1.protect(TestResult.java:106)
      3. junit.framework.TestResult.runProtected(TestResult.java:124)
      4. junit.framework.TestResult.run(TestResult.java:109)
      5. junit.framework.TestCase.run(TestCase.java:118)
      6. junit.framework.TestSuite.runTest(TestSuite.java:208)
      7. junit.framework.TestSuite.run(TestSuite.java:203)
      8. junit.textui.TestRunner.doRun(TestRunner.java:116)
      8 frames
    7. IDEA
      IdeaTestRunner.doRun
      1. com.intellij.rt.execution.junit.IdeaTestRunner.doRun(IdeaTestRunner.java:65)
      1 frame
    8. JUnit
      TestRunner.doRun
      1. junit.textui.TestRunner.doRun(TestRunner.java:109)
      1 frame
    9. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:24)
      2. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118)
      3. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
      3 frames
    10. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    11. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
      1 frame