2015-06-16 86 views
3

我們在這個過程中遷移的Java 7和JBoss 7 Wildfly和Java 8JBAS011445:無法使用WildFly

在這個過程中有一個錯誤得到適配器的持久性提供。

16:38:51,323 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.subunit."foo_all.ear"."foo_sb.jar".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."foo_all.ear"."foo_sb.jar".FIRST_MODULE_USE: JBAS018733: Failed to process phase FIRST_MODULE_USE of subdeployment "foo_sb.jar" of deployment "foo_all.ear" 
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.0.Final.jar:8.2.0.Final] 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final] 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final] 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_45] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_45] 
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_45] 
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011445: Failed to get adapter for persistence provider 'de.foo.FooHibernatePersistenceProvider' 
    at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.getPersistenceProviderAdaptor(PersistenceUnitServiceHandler.java:861) 
    at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService(PersistenceUnitServiceHandler.java:259) 
    at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleJarDeployment(PersistenceUnitServiceHandler.java:153) 
    at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:128) 
    at org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:52) 
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final] 
    ... 5 more 

16:38:51,354 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "foo_all.ear")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"foo_all.ear\".\"foo_sb.jar\".FIRST_MODULE_USE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"foo_all.ear\".\"foo_sb.jar\".FIRST_MODULE_USE: JBAS018733: Failed to process phase FIRST_MODULE_USE of subdeployment \"foo_sb.jar\" of deployment \"foo_all.ear\" 
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011445: Failed to get adapter for persistence provider 'de.foo.FooHibernatePersistenceProvider'"}} 

耳朵文件可以部署,服務器可以啓動。但是,EAR文件被創建後子部署在主要部署的根目錄進行部署。

持久XML看起來是這樣的:

<?xml version="1.0" encoding="UTF-8"?> 
<persistence xmlns="http://java.sun.com/xml/ns/persistence" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_1.xsd" 
    version="2.1"> 
    <persistence-unit name="foo"> 
     <provider>de.foo.srv.persistenceprovider.fooHibernatePersistenceProvider</provider> 
     <jta-data-source>java:/foo</jta-data-source> 
     <jar-file>foo_sb.jar</jar-file> 
     <properties> 
      <property name="jboss.as.jpa.adapterModule" value="org.jboss.as.jpa.hibernate:4" /> 
     </properties> 
    </persistence-unit> 
</persistence> 

我已經安裝了ojdbc7.jar和測試的連接。所需的JAR的已經連接在JBoss的7。這在JBoss的7運作良好,我不知道爲什麼它不與Wildfly工作。

請幫忙!

+0

是de.foo.srv.persistenceprovider.fooHibernatePersistenceProvider你自己的自定義持久化提供程序還是你試圖使用休眠?如果您刪除,會發生什麼情況? –

+0

這是我自己PersistenceProvider類。我需要這個,不能刪除這個。 – Johnny2012

+0

有人嗎?請幫忙! – Johnny2012

回答

0

我刪除了休眠特性和它的工作。

<property name="jboss.as.jpa.adapterModule" value="org.jboss.as.jpa.hibernate:4" /> 
0

嘗試從wildfly/lib目錄中刪除hibernate.jar。它被捆綁在野蠅本身,可能會導致這樣的問題。

+0

感謝回答,但我沒有在wildfly/standalone/libs中使用hibernate.jar – Johnny2012

相關問題