Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [spring-config.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build EntityManagerFactory
  2. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1572)
  3. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
  4. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
  5. at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
  6. at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
  7. at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
  8. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
  9. at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:963)
  10. at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:752)
  11. at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
  12. at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
  13. at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
  14. at com.hibernate.main.Main.main(Main.java:10)
  15. Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build EntityManagerFactory
  16. at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:924)
  17. at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
  18. at org.springframework.orm.jpa.vendor.SpringHibernateEjbPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateEjbPersistenceProvider.java:51)
  19. at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343)
  20. at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)
  21. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1631)
  22. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
  23. ... 12 more
  24. Caused by: org.hibernate.MappingException: Repeated column in mapping for entity: com.hibernate.model.Orderdetail column: orderNumber (should be mapped with insert="false" update="false")
  25. at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:696)
  26. at org.hibernate.mapping.PersistentClass.checkPropertyColumnDuplication(PersistentClass.java:718)
  27. at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:740)
  28. at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:493)
  29. at org.hibernate.mapping.RootClass.validate(RootClass.java:270)
  30. at org.hibernate.cfg.Configuration.validate(Configuration.java:1327)
  31. at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1789)
  32. at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)
  33. at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
  34. ... 18 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement