java.lang.NoSuchMethodError

tip

I was using the library hibernate-entitymanager:4.3.5.Final with java persistence API 2.0 instead of using it with hibernate-entitymanager:4.2.8.Final.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • JBoss 7.1 and Hibernte 4.3.5 cause exception
    via Stack Overflow by saria
    ,
  • Using JPA in JavaFX environment
    via Stack Overflow by Mnemonics
    ,
    • java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/persistence/Index; at org.hibernate.cfg.annotations.EntityBinder.processComplementaryTableDefinitions(EntityBinder.java:936)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:824)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3788)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3742)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1410)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1844)[hibernate-core-4.3.5.Final.jar:4.3.5.Final] at com.esprit.dao.EntityDao.getSessionFactory(EntityDao.java:48)[classes:] at com.esprit.dao.EntityDao.openCurrentSession(EntityDao.java:25)[classes:] at com.esprit.dao.EntityService.findAllPersons(EntityService.java:86)[classes:] at com.esprit.crud.dynamic.DataModelBeanD.init(DataModelBeanD.java:37)[classes:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[rt.jar:1.7.0_55] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[rt.jar:1.7.0_55] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[rt.jar:1.7.0_55]

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    35 more bugmates