org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [MysqlUnit] failed. Internal Exception: Exception [EclipseLink-7155] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException Exception Description: The type [class com.azelea.ProcessMgmt.entities.ProcessInfo] for the attribute [info] on the entity class [class com.azelea.ProcessMgmt.entities.Process] is not a valid type for a serialized mapping. The attribute type must implement the Serializable interface.

Spring JIRA | deng hui | 5 years ago
  1. 0

    when I used ProcessInfo class in Process class, I got a error like: {code} 2012-01-30 21:35:01,196 ERROR: Context initialization failed >>> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:307) org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [MysqlUnit] failed. Internal Exception: Exception [EclipseLink-7155] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException Exception Description: The type [class com.azelea.ProcessMgmt.entities.ProcessInfo] for the attribute [info] on the entity class [class com.azelea.ProcessMgmt.entities.Process] is not a valid type for a serialized mapping. The attribute type must implement the Serializable interface. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:449) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) ... {code} {code:java} @Document public class ProcessInfo { private Set<ProcessGantt> gantt; public Set<ProcessGantt> getGantt() { return gantt; } public void setGantt(Set<ProcessGantt> gantt) { this.gantt = gantt; } } {code} {code:java} @Entity public class Process extends ManagedEntity implements Serializable { private static final long serialVersionUID = 1L; @NotNull private String name; @Embedded private Description description; @RelatedDocument private ProcessInfo info; } {code}

    Spring JIRA | 5 years ago | deng hui
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [MysqlUnit] failed. Internal Exception: Exception [EclipseLink-7155] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException Exception Description: The type [class com.azelea.ProcessMgmt.entities.ProcessInfo] for the attribute [info] on the entity class [class com.azelea.ProcessMgmt.entities.Process] is not a valid type for a serialized mapping. The attribute type must implement the Serializable interface.
  2. 0

    when I used ProcessInfo class in Process class, I got a error like: {code} 2012-01-30 21:35:01,196 ERROR: Context initialization failed >>> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:307) org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [MysqlUnit] failed. Internal Exception: Exception [EclipseLink-7155] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException Exception Description: The type [class com.azelea.ProcessMgmt.entities.ProcessInfo] for the attribute [info] on the entity class [class com.azelea.ProcessMgmt.entities.Process] is not a valid type for a serialized mapping. The attribute type must implement the Serializable interface. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:449) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) ... {code} {code:java} @Document public class ProcessInfo { private Set<ProcessGantt> gantt; public Set<ProcessGantt> getGantt() { return gantt; } public void setGantt(Set<ProcessGantt> gantt) { this.gantt = gantt; } } {code} {code:java} @Entity public class Process extends ManagedEntity implements Serializable { private static final long serialVersionUID = 1L; @NotNull private String name; @Embedded private Description description; @RelatedDocument private ProcessInfo info; } {code}

    Spring JIRA | 5 years ago | deng hui
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [MysqlUnit] failed. Internal Exception: Exception [EclipseLink-7155] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException Exception Description: The type [class com.azelea.ProcessMgmt.entities.ProcessInfo] for the attribute [info] on the entity class [class com.azelea.ProcessMgmt.entities.Process] is not a valid type for a serialized mapping. The attribute type must implement the Serializable interface.
  3. 0

    Error creating bean with name 'entityManagerFactory'+ NoClassDefFoundError: org/hibernate/MappingException

    Stack Overflow | 4 years ago | Sandeep Soni
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring/db.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/MappingException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error creating bean with name 'entityManagerFactory'+ NoClassDefFoundError: org/hibernate/MappingException

    baba.io | 11 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring/db.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/MappingException
  6. 0

    Error creating bean with name 'entityManagerFactory'+ NoClassDefFoundError: org/hibernate/MappingException

    dolinked.com | 7 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring/db.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/MappingException

  1. tvrmsmith 4 times, last 3 months ago
  2. dafman 2 times, last 3 months ago
  3. tvrmsmith 1 times, last 3 months ago
  4. Tahir 49 times, last 4 months ago
  5. Malcshour 8 times, last 6 months ago
13 more registered users
79 unregistered visitors
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. org.springframework.beans.factory.BeanCreationException

    Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException Exception Description: Predeployment of PersistenceUnit [MysqlUnit] failed. Internal Exception: Exception [EclipseLink-7155] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.ValidationException Exception Description: The type [class com.azelea.ProcessMgmt.entities.ProcessInfo] for the attribute [info] on the entity class [class com.azelea.ProcessMgmt.entities.Process] is not a valid type for a serialized mapping. The attribute type must implement the Serializable interface.

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean()
  2. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    3. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    4. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    5. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    6. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    6 frames
  3. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:728)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:449)
    2 frames
  4. Spring
    ContextLoaderListener.contextInitialized
    1. org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
    2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
    3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    3 frames
  5. Glassfish Core
    StandardContext$1.call
    1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
    2. org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
    3. org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
    3 frames
  6. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    2. java.util.concurrent.FutureTask.run(Unknown Source)
    3. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    5. java.lang.Thread.run(Unknown Source)
    5 frames