java.lang.NoSuchFieldError: EMPTY_ITERATOR

Hibernate JIRA | Jesse Houwing | 1 decade 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

    Using this mapping (removed additional info for version and key): <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="Project" > <id name="id" /> <version name="hbmVersion" /> <component name="projectData" class="Data" access="field" > <!-- left empty for later implementatio --> </component> </class> I get the following exception while loading the mappings: java.lang.NoSuchFieldError: EMPTY_ITERATOR at net.sf.hibernate.util.JoinedIterator.updateCurrentIterator(JoinedIterator.java:63) at net.sf.hibernate.util.JoinedIterator.hasNext(JoinedIterator.java:42) at net.sf.hibernate.mapping.SimpleValue.setType(SimpleValue.java:55) at net.sf.hibernate.cfg.Binder.bindComponent(Binder.java:911) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1041) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:361) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1243) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285) at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:351) at nl.sogeti.glazenhuis.dashboard.InitializeDatabaseMain.<init>(HibernateStandaloneMain.java:102) at nl.sogeti.glazenhuis.dashboard.InitializeDatabaseMain.main(HibernateStandaloneMain.java:66) The strangest thing is that if I load these same mapping from a hibernate.cfg.xml I get no error and everything works as expected. Adding at least one property to the component tag also solves the problem. As does commenting the whole tag ofcourse.

    Hibernate JIRA | 1 decade ago | Jesse Houwing
    java.lang.NoSuchFieldError: EMPTY_ITERATOR
  2. 0

    Using this mapping (removed additional info for version and key): <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="Project" > <id name="id" /> <version name="hbmVersion" /> <component name="projectData" class="Data" access="field" > <!-- left empty for later implementatio --> </component> </class> I get the following exception while loading the mappings: java.lang.NoSuchFieldError: EMPTY_ITERATOR at net.sf.hibernate.util.JoinedIterator.updateCurrentIterator(JoinedIterator.java:63) at net.sf.hibernate.util.JoinedIterator.hasNext(JoinedIterator.java:42) at net.sf.hibernate.mapping.SimpleValue.setType(SimpleValue.java:55) at net.sf.hibernate.cfg.Binder.bindComponent(Binder.java:911) at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1041) at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:361) at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1243) at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249) at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285) at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:351) at nl.sogeti.glazenhuis.dashboard.InitializeDatabaseMain.<init>(HibernateStandaloneMain.java:102) at nl.sogeti.glazenhuis.dashboard.InitializeDatabaseMain.main(HibernateStandaloneMain.java:66) The strangest thing is that if I load these same mapping from a hibernate.cfg.xml I get no error and everything works as expected. Adding at least one property to the component tag also solves the problem. As does commenting the whole tag ofcourse.

    Hibernate JIRA | 1 decade ago | Jesse Houwing
    java.lang.NoSuchFieldError: EMPTY_ITERATOR
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchFieldError

      EMPTY_ITERATOR

      at net.sf.hibernate.util.JoinedIterator.updateCurrentIterator()
    2. net.sf.hibernate
      Configuration.addClass
      1. net.sf.hibernate.util.JoinedIterator.updateCurrentIterator(JoinedIterator.java:63)
      2. net.sf.hibernate.util.JoinedIterator.hasNext(JoinedIterator.java:42)
      3. net.sf.hibernate.mapping.SimpleValue.setType(SimpleValue.java:55)
      4. net.sf.hibernate.cfg.Binder.bindComponent(Binder.java:911)
      5. net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1041)
      6. net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:361)
      7. net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1243)
      8. net.sf.hibernate.cfg.Configuration.add(Configuration.java:249)
      9. net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285)
      10. net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:351)
      10 frames
    3. nl.sogeti.glazenhuis
      InitializeDatabaseMain.main
      1. nl.sogeti.glazenhuis.dashboard.InitializeDatabaseMain.<init>(HibernateStandaloneMain.java:102)
      2. nl.sogeti.glazenhuis.dashboard.InitializeDatabaseMain.main(HibernateStandaloneMain.java:66)
      2 frames