2016-02-29 141 views
0

注意:我用Javaee開發了一個新的開發工具。 我的問題似乎很簡單,但我無法理解它,我創建了一個簡單的Maven項目,當我嘗試在Maven中構建它並編寫「wildfly:deploy」時,我遇到了部署「.war和this是.LOG:maven項目+野蠻+部署.war

Services which failed to start:  service jboss.deployment.unit."pfeweb.war".component.AlimentationBD.START: org.jboss.msc.service.StartException in service jboss.deployment.unit."pfeweb.war".component.AlimentationBD.START: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance 

15:26:18,891 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:19990/management 
15:26:18,892 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:19990 
15:26:18,892 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 9.0.1.Final (WildFly Core 1.0.1.Final) started (with errors) in 15180ms - Started 362 of 540 services (5 services failed or missing dependencies, 221 services are lazy, passive or on-demand) 
15:26:18,969 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 18) WFLYJPA0011: Stopping Persistence Unit (phase 2 of 2) Service 'pfeweb.war#pfe-ejb' 
15:26:18,980 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0010: Stopping weld service for deployment pfeweb.war 
15:26:18,981 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 18) WFLYJPA0011: Stopping Persistence Unit (phase 1 of 2) Service 'pfeweb.war#pfe-ejb' 
15:26:19,051 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0028: Stopped deployment pfeweb.war (runtime-name: pfeweb.war) in 104ms 
15:26:19,196 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "pfeweb.war" (runtime-name: "pfeweb.war") 
15:26:19,198 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report 
WFLYCTL0184: New missing/unsatisfied dependencies: 
     service jboss.deployment.unit."pfeweb.war".WeldStartService (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./pfeweb, service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.deployment.unit."pfeweb.war".component.AlimentationBD.START (missing) dependents: [service jboss.deployment.unit."pfeweb.war".moduleDeploymentRuntimeInformationStart, service jboss.deployment.unit."pfeweb.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./pfeweb, service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.deployment.unit."pfeweb.war".component.AuthentificationService.START (missing) dependents: [service jboss.deployment.unit."pfeweb.war".moduleDeploymentRuntimeInformationStart, service jboss.deployment.unit."pfeweb.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./pfeweb, service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.deployment.unit."pfeweb.war".component."Beans.AccessBean".START (missing) dependents: [service jboss.deployment.unit."pfeweb.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./pfeweb, service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.deployment.unit."pfeweb.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.deployment.unit."pfeweb.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./pfeweb, service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.deployment.unit."pfeweb.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.deployment.unit."pfeweb.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./pfeweb, service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.deployment.unit."pfeweb.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.deployment.unit."pfeweb.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./pfeweb, service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.deployment.unit."pfeweb.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.deployment.unit."pfeweb.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./pfeweb, service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.deployment.unit."pfeweb.war".component."org.jboss.weld.servlet.WeldInitialListener".START (missing) dependents: [service jboss.deployment.unit."pfeweb.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./pfeweb, service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.deployment.unit."pfeweb.war".component."org.jboss.weld.servlet.WeldTerminalListener".START (missing) dependents: [service jboss.deployment.unit."pfeweb.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./pfeweb, service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.deployment.unit."pfeweb.war".ee.ComponentRegistry (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.deployment.unit."pfeweb.war".moduleDeploymentRuntimeInformation (missing) dependents: [service jboss.deployment.unit."pfeweb.war".moduleDeploymentRuntimeInformationStart] 
     service jboss.persistenceunit."pfeweb.war#pfe-ejb" (missing) dependents: [service jboss.deployment.unit."pfeweb.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./pfeweb, service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.server.global-request-controller.control-point."pfeweb.war".undertow (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.undertow.deployment.default-server.default-host./pfeweb (missing) dependents: [service jboss.deployment.unit."pfeweb.war".deploymentCompleteService] 
     service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./pfeweb] 
     service jboss.undertow.deployment.default-server.default-host./pfeweb.codec (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
     service jboss.undertow.deployment.default-server.default-host./pfeweb.session (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./pfeweb.UndertowDeploymentInfoService] 
WFLYCTL0186: Services which failed to start:  service jboss.deployment.unit."pfeweb.war".component.AlimentationBD.START 

15:26:23,416 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found pfeweb.war in deployment directory. To trigger deployment create a file called pfeweb.war.dodeploy 

有人可以幫我請

+0

有什麼地方錯了你的'AlimentationBD'豆,這似乎是某種類型的EJB 。 –

+0

您需要顯示上面日誌的部分,因爲那通常會包含更多有用信息 –

+0

您好再次 這是問題的部分: – MOhamed

回答

0
This is pom.xml of the war project 
<modelVersion>4.0.0</modelVersion> 
<groupId>tn.orange.pfe</groupId> 
<artifactId>pfeweb</artifactId> 
<version>0.0.1-SNAPSHOT</version> 
<packaging>war</packaging> 
<properties> 
    <maven.compiler.source>1.7</maven.compiler.source> 
    <maven.compiler.target>1.7</maven.compiler.target> 
    <failOnMissingWebXml>false</failOnMissingWebXml> 
</properties> 
<dependencies> 
    <dependency> 
     <groupId>javax</groupId> 
     <artifactId>javaee-api</artifactId> 
     <version>7.0</version> 
    </dependency> 
    <dependency> 
     <groupId>tn.orange.pfe</groupId> 
     <version>0.0.1-SNAPSHOT</version> 
     <artifactId>pfeejb</artifactId> 
     <type>ejb</type> 
    </dependency> 
    <dependency> 
     <groupId>org.primefaces</groupId> 
     <artifactId>primefaces</artifactId> 
     <version>5.2</version> 
    </dependency> 

</dependencies> 
<build> 
    <plugins> 
     <plugin> 
      <groupId>org.wildfly.plugins</groupId> 
      <artifactId>wildfly-maven-plugin</artifactId> 
      <version>1.0.2.Final</version> 
      <configuration> 
       <hostname>localhost</hostname> 
       <port>18181</port> 
       <finalName>${project.artifactId}</finalName> 
      </configuration> 
     </plugin> 
     </plugins> 
</build> 

0

這很簡單,你可能有一些相互矛盾的API(具體的javax.servlet-API在這裏)。

嘗試通過在pom.xml的變化範圍內,提供範圍只能將依賴而編譯時間,並依賴不會衝突在運行時,與wildfly提供默認的javax servlet的依賴。

<dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency>

此,您提供的Servlet API的,也不由服務器提供的一個衝突,而依賴只會存在,而編譯時間。 (PS - 服務器還提供的javax.servlet),如果你已經使用maven install,從庫中直接刪除javax.servlet-api並做maven install再次