1
部署期間出現以下錯誤。我使用wildfly 8.x. 當它加載服務器時,我得到404錯誤頁面。使用Wildfly部署錯誤servlet
04:39:07,010 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-11) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./projectTeam2v2.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./projectTeam2v2.UndertowDeploymentInfoService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_73]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_73]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_73]
Caused by: java.lang.IllegalArgumentException: JBAS017354: Could not find the port number listening for protocol javax.ws.rs.core.Application
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:648)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:256)
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]
... 3 more
+
04:39:14,333 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "projectTeam2v2.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./projectTeam2v2.UndertowDeploymentInfoService" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./projectTeam2v2.UndertowDeploymentInfoService: Failed to start service
Caused by: java.lang.IllegalArgumentException: JBAS017354: Could not find the port number listening for protocol javax.ws.rs.core.Application"}}
+
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./projectTeam2v2.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./projectTeam2v2.UndertowDeploymentInfoService: Failed to start service
+
JBAS014775: New missing/unsatisfied dependencies:
service jboss.deployment.unit."projectTeam2v2.war".component."com.ibm.controller.CDController".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./projectTeam2v2, service jboss.deployment.unit."projectTeam2v2.war".deploymentCompleteService]
service jboss.deployment.unit."projectTeam2v2.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./projectTeam2v2, service jboss.deployment.unit."projectTeam2v2.war".deploymentCompleteService]
service jboss.deployment.unit."projectTeam2v2.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./projectTeam2v2, service jboss.deployment.unit."projectTeam2v2.war".deploymentCompleteService]
service jboss.deployment.unit."projectTeam2v2.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.deployment.unit."projectTeam2v2.war".deploymentCompleteService]
service jboss.undertow.deployment.default-server.default-host./projectTeam2v2 (missing) dependents: [service jboss.deployment.unit."projectTeam2v2.war".deploymentCompleteService]
service jboss.undertow.deployment.default-server.default-host./projectTeam2v2.UndertowDeploymentInfoService (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./projectTeam2v2]
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./projectTeam2v2.UndertowDeploymentInfoService
+
JBAS014776: Newly corrected services:
service jboss.deployment.unit."projectTeam2v2.war".component."com.ibm.controller.CDController".START (no longer required)
service jboss.deployment.unit."projectTeam2v2.war".component."com.sun.faces.config.ConfigureListener".START (no longer required)
service jboss.deployment.unit."projectTeam2v2.war".component."javax.faces.webapp.FacetTag".START (no longer required)
service jboss.deployment.unit."projectTeam2v2.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (no longer required)
service jboss.undertow.deployment.default-server.default-host./projectTeam2v2 (no longer required)
service jboss.undertow.deployment.default-server.default-host./projectTeam2v2.UndertowDeploymentInfoService (no longer required)
+
04:46:20,148 ERROR [stderr] (xnio-file-watcher[Watcher for C:\Users\IMC\wildfly-8.2.1.Final\standalone\deployments\SpringMVC.war/]-0) Exception in thread "xnio-file-watcher[Watcher for C:\Users\IMC\wildfly-8.2.1.Final\standalone\deployments\SpringMVC.war/]-0" java.nio.file.ClosedWatchServiceException
04:46:20,149 ERROR [stderr] (xnio-file-watcher[Watcher for C:\Users\IMC\wildfly-8.2.1.Final\standalone\deployments\SpringMVC.war/]-0) at sun.nio.fs.AbstractWatchService.checkOpen(AbstractWatchService.java:80)
04:46:20,149 ERROR [stderr] (xnio-file-watcher[Watcher for C:\Users\IMC\wildfly-8.2.1.Final\standalone\deployments\SpringMVC.war/]-0) at sun.nio.fs.AbstractWatchService.checkKey(AbstractWatchService.java:92)
04:46:20,149 ERROR [stderr] (xnio-file-watcher[Watcher for C:\Users\IMC\wildfly-8.2.1.Final\standalone\deployments\SpringMVC.war/]-0) at sun.nio.fs.AbstractWatchService.take(AbstractWatchService.java:119)
04:46:20,149 ERROR [stderr] (xnio-file-watcher[Watcher for C:\Users\IMC\wildfly-8.2.1.Final\standalone\deployments\SpringMVC.war/]-0) at org.xnio.nio.WatchServiceFileSystemWatcher.run(WatchServiceFileSystemWatcher.java:85)
04:46:20,150 ERROR [stderr] (xnio-file-watcher[Watcher for C:\Users\IMC\wildfly-8.2.1.Final\standalone\deployments\SpringMVC.war/]-0) at java.lang.Thread.run(Thread.java:745)
在web.xml中我沒有MySQL的依賴。這可能是問題嗎? 謝謝你的時間:)。
您沒有一個' '用於'javax.ws.rs.core.Application'定義。嘗試保留' '定義,並保留' '。 –
非常感謝! 如果我像這裏顯示的那樣配置web.xml https://docs.oracle.com/cd/E24329_01/web.1211/e24983/configure.htm#RESTF187(帶有servlet-class)會不錯? –
你根本不需要提供實現類。 FWIW這個具體的例子根本不起作用,因爲WIldFly使用RESTEasy而不使用Jersey來實現它的JAX-RS。只要刪除' '元素,其他應該工作。 –