在Schema Update Complete之后,创建了数据库,但是我收到此错误消息并且部署失败。
16:57:33,133 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.persistenceunit."axbi-ear.ear/axbi-ejb.jar#axbiEJBModulePU": org.jboss.msc.service.StartException in service jboss.persistenceunit."axbi-ear.ear/axbi-ejb.jar#axbiEJBModulePU": Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: java.lang.NullPointerException
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:54) [rt.jar:1.7.0_51]
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:75) [rt.jar:1.7.0_51]
at java.lang.reflect.Field.set(Field.java:741) [rt.jar:1.7.0_51]
at org.hibernate.ejb.metamodel.MetadataContext.registerAttribute(MetadataContext.java:415)
at org.hibernate.ejb.metamodel.MetadataContext.registerAttributes(MetadataContext.java:373)
at org.hibernate.ejb.metamodel.MetadataContext.populateStaticMetamodel(MetadataContext.java:350)
at org.hibernate.ejb.metamodel.MetadataContext.wrapUp(MetadataContext.java:242)
at org.hibernate.ejb.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:83)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:106)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
at org.hibernate.ejb.HibernatePersistence.__createContainerEntityManagerFactory(HibernatePersistence.java:76)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
... 3 more
16:57:33,366 INFO [org.jboss.as.server] (HttpManagementService-threads - 2) JBAS015870: Deploy of deployment "axbi-ear.ear"
我从EclipseLink迁移到Hibernate我的整个项目。关于什么是错的任何线索?
答案 0 :(得分:0)
在查看我发现问题的所有实体之后,一些映射出错了。但是Hibernate可能已经指出了一个特定的错误......而不是这个通用的NPE。