我正在將Spring + Hibernate應用程序從Weblogic 12c遷移到JBoss AS 7,以及我發現了以下錯誤:JBoss AS 7不使用WEB-INF hibernate lib並拋出「未知服務請求[org.hibernate.boot.registry.classloading.spi.ClassLoaderService]」
20:07:47,395 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.persistenceunit."connecta-presenter-2.2.1.war#ConnectaPresenterPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."connecta-presenter-2.2.1.war#ConnectaPresenterPU": 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_95]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_95]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_95]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ConnectaPresenterPU] 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.service.UnknownServiceException: Unknown service requested [org.hibernate.boot.registry.classloading.spi.ClassLoaderService]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:126)
at org.hibernate.search.hcore.impl.HibernateSearchIntegrator.integrate(HibernateSearchIntegrator.java:49)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:294)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
... 9 more
的Unknown service requested [org.hibernate.boot.registry.classloading.spi.ClassLoaderService]
消息由線的org.hibernate.service.internal.AbstractServiceRegistryImpl
126拋出僅在休眠核心,這是在版本的版本4.0.1拋出的異常我的JBoss AS 7模塊文件夾。
事情是,我的應用程序使用休眠4.3.10,這個特定的行在此版本中不存在更多(我可以看到比較Github上的源代碼)。
下對JBoss文檔AS 7個網站指出,當遷移從WebLogic中的JBoss:
所以沒有這樣的代碼在jboss-web.xml
文件中的以下內容:
<prefer-application-packages>
<package-name>javassist.*</package-name>
</prefer-application-packages>
它說JBoss在內部模塊之前總是使用WEB-INF/classes
和WEB-INF/lib
。
有什麼想法發生了什麼?
我的回答對你有幫助嗎@Diego? – Sampada