javax.persistence.PersistenceException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When a class is mapped more than once, as defined in the documentation - http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch05.html#mapping-entityname - a PersistenceException is thrown when creating the EntityManagerFactory. stack trace: javax.persistence.PersistenceException: Error build callback listeners; entity [org.example.ExampleEntity was already processed at org.hibernate.jpa.event.internal.jpa.CallbackRegistryImpl.addEntityCallbacks(CallbackRegistryImpl.java:131) at org.hibernate.jpa.event.internal.jpa.LegacyCallbackProcessor.processCallbacksForEntity(LegacyCallbackProcessor.java:71) at org.hibernate.jpa.event.spi.JpaIntegrator.integrate(JpaIntegrator.java:150) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:310) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1857) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:399) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:73) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
    via by Felix Feisst,
  • When a class is mapped more than once, as defined in the documentation - http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch05.html#mapping-entityname - a PersistenceException is thrown when creating the EntityManagerFactory. stack trace: javax.persistence.PersistenceException: Error build callback listeners; entity [org.example.ExampleEntity was already processed at org.hibernate.jpa.event.internal.jpa.CallbackRegistryImpl.addEntityCallbacks(CallbackRegistryImpl.java:131) at org.hibernate.jpa.event.internal.jpa.LegacyCallbackProcessor.processCallbacksForEntity(LegacyCallbackProcessor.java:71) at org.hibernate.jpa.event.spi.JpaIntegrator.integrate(JpaIntegrator.java:150) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:310) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1857) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:399) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:73) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
    via by Felix Feisst,
    • javax.persistence.PersistenceException: Callback methods annotated in a listener bean class must return void and take one argument: javax.persistence.PreUpdate - private void co.elsumo.werp.model.Detail.onUpdate() at org.hibernate.jpa.event.internal.jpa.LegacyCallbackProcessor.resolveCallbacks(LegacyCallbackProcessor.java:172) at org.hibernate.jpa.event.internal.jpa.LegacyCallbackProcessor.processCallbacksForEntity(LegacyCallbackProcessor.java:70) at org.hibernate.jpa.event.spi.JpaIntegrator.integrate(JpaIntegrator.java:150) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:312) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:857) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:425) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:849) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:75) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) at org.openxava.jpa.XPersistence.getEntityManagerFactory(XPersistence.java:197) at org.openxava.jpa.XPersistence.createManager(XPersistence.java:112) at org.openxava.jpa.XPersistence.openManager(XPersistence.java:128) at org.openxava.jpa.XPersistence.getManager(XPersistence.java:98) at com.openxava.naviox.impl.DB.isAutoUpdateSchema(DB.java:145) at com.openxava.naviox.impl.DB.createDB(DB.java:127) at com.openxava.naviox.impl.DB.init(DB.java:33) at com.openxava.naviox.Modules.init(Modules.java:37) at com.openxava.naviox.web.NaviOXFilter.init(NaviOXFilter.java:22) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4797) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5473) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3976) at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:426) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519) at java.lang.Thread.run(Thread.java:745)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,