我对 JBoss 7.1.1.Final 有一个非常奇怪的问题。
尝试使用我从 JBoss 5.1 迁移的持久性单元部署一个 jar(它可以正常工作)
我进行了必要的更改(我可以找到)并且在部署时,我收到一条无用的错误消息。
16:19:21,532 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "DomainModel-0.1.0-SNAPSHOT.jar"
16:19:21,556 INFO [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011401: Read persistence.xml for admin
16:19:21,561 WARN [org.jboss.as.dependency.private] (MSC service thread 1-4) JBAS018567: Deployment "deployment.DomainModel-0.1.0-SNAPSHOT.jar" is using a private module ("org.apache.commons.collections:main") which may be changed or removed in future versions without notice.
16:19:21,562 WARN [org.jboss.as.dependency.private] (MSC service thread 1-4) JBAS018567: Deployment "deployment.DomainModel-0.1.0-SNAPSHOT.jar" is using a private module ("org.apache.commons.lang:main") which may be changed or removed in future versions without notice.
16:19:21,566 INFO [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011402: Starting Persistence Unit Service 'DomainModel-0.1.0-SNAPSHOT.jar#admin'
16:19:21,566 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-1) HHH000204: Processing PersistenceUnitInfo [
name: admin
...]
16:19:21,730 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.persistenceunit."DomainModel-0.1.0-SNAPSHOT.jar#admin": org.jboss.msc.service.StartException in service jboss.persistenceunit."DomainModel-0.1.0-SNAPSHOT.jar#admin": 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:1110) [rt.jar:1.7.0_10]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_10]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_10]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: admin] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
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
Caused by: org.hibernate.AnnotationException: Associated class not found: java.lang.String
at org.hibernate.cfg.annotations.MapBinder.bindKeyFromAssociationTable(MapBinder.java:136)
at org.hibernate.cfg.annotations.MapBinder.access$000(MapBinder.java:75)
at org.hibernate.cfg.annotations.MapBinder$1.secondPass(MapBinder.java:114)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:66)
at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1586)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1359)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1724)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
... 9 more
16:19:21,941 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "DomainModel-0.1.0-SNAPSHOT.jar" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"DomainModel-0.1.0-SNAPSHOT.jar#admin\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"DomainModel-0.1.0-SNAPSHOT.jar#admin\": Failed to start service"}}
16:19:21,948 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment DomainModel-0.1.0-SNAPSHOT.jar in 6ms
16:19:21,949 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.persistenceunit."DomainModel-0.1.0-SNAPSHOT.jar#admin": org.jboss.msc.service.StartException in service jboss.persistenceunit."DomainModel-0.1.0-SNAPSHOT.jar#admin": Failed to start service
16:19:21,950 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"DomainModel-0.1.0-SNAPSHOT.jar#admin\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"DomainModel-0.1.0-SNAPSHOT.jar#admin\": Failed to start service"}}}}
我遇到的问题不是它本身的错误——我可能可以弄清楚。困扰我的是它没有告诉我它在哪里有这个问题 - 即哪个实体有这个问题。
在谷歌搜索中,我能够找到与 Maps 的 ElementCollections 相关的问题,我已经更新了这些问题,它更改为找不到 Longs - 更多更新,它又回到了 String。
有谁知道我怎样才能告诉我它在哪个班级遇到问题?
谢谢...