使用 Wildfly 8.1 中使用的相同代码和数据源配置,当我尝试在 Wildfly 8.2 中部署 WAR 时出现错误下面...
但相同的WAR 在 Wildfly 8.1
中工作Wildfly 8.2 有什么问题?
23:00:59,567 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016008: Starting weld service for deployment bandradios-admin.war
23:01:01,622 INFO [io.undertow.servlet] (MSC service thread 1-3) Spring WebApplicationInitializers detected on classpath: [br.com.onebrasil.bandradios.web.app.initializer.SpringMvcInitializer@26b0d869, br.com.onebrasil.bandradios.web.app.initializer.SpringSecurityInitializer@244fe957]
23:01:01,775 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./bandradios-admin: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./bandradios-admin: 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:1145) [rt.jar:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]
Caused by: java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 4, Size: 0
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:222)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
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
Caused by: java.lang.IndexOutOfBoundsException: Index: 4, Size: 0
at java.util.ArrayList.rangeCheckForAdd(ArrayList.java:643) [rt.jar:1.7.0_75]
at java.util.ArrayList.add(ArrayList.java:455) [rt.jar:1.7.0_75]
at io.undertow.servlet.api.DeploymentInfo.insertFilterUrlMapping(DeploymentInfo.java:349)
at io.undertow.servlet.spec.ServletContextImpl.addMappingForUrlPatterns(ServletContextImpl.java:860)
at io.undertow.servlet.spec.FilterRegistrationImpl.addMappingForUrlPatterns(FilterRegistrationImpl.java:73)
at org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer.registerFilter(AbstractSecurityWebApplicationInitializer.java:219)
at org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer.insertSpringSecurityFilterChain(AbstractSecurityWebApplicationInitializer.java:147)
at org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer.onStartup(AbstractSecurityWebApplicationInitializer.java:121)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:182)
... 7 more
23:01:01,785 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "bandradios-admin.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./bandradios-admin" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./bandradios-admin: Failed to start service
Caused by: java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 4, Size: 0
Caused by: java.lang.IndexOutOfBoundsException: Index: 4, Size: 0"}}
23:01:02,155 INFO [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "bandradios-admin.war" (runtime-name : "bandradios-admin.war")
23:01:02,161 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./bandradios-admin: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./bandradios-admin: Failed to start service
23:01:02,220 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
23:01:02,221 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
23:01:02,221 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: WildFly 8.2.0.Final "Tweek" started (with errors) in 16229ms - Started 445 of 502 services (2 services failed or missing dependencies, 92 services are lazy, passive or on-demand)
23:01:02,458 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016009: Stopping weld service for deployment bandradios-admin.war
23:01:02,667 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment bandradios-admin.war (runtime-name: bandradios-admin.war) in 255ms
23:01:02,852 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "bandradios-admin.war" (runtime-name: "bandradios-admin.war")
23:01:02,891 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.deployment.unit."bandradios-admin.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."org.jboss.weld.servlet.WeldInitialListener".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."org.jboss.weld.servlet.WeldTerminalListener".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."org.springframework.http.server.ServletServerHttpAsyncRequestControl".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."org.springframework.security.taglibs.authz.AccessControlListTag".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."org.springframework.security.taglibs.authz.AuthenticationTag".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."org.springframework.security.taglibs.authz.JspAuthorizeTag".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."org.springframework.security.taglibs.csrf.CsrfInputTag".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."org.springframework.security.taglibs.csrf.CsrfMetaTagsTag".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."org.springframework.web.context.request.async.StandardServletAsyncWebRequest".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.deployment.unit."bandradios-admin.war".component."org.springframework.web.servlet.tags.ArgumentTag".START (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
service jboss.undertow.deployment.default-server.default-host./bandradios-admin (missing) dependents: [service jboss.deployment.unit."bandradios-admin.war".deploymentCompleteService]
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./bandradios-admin
答案 0 :(得分:1)
这是Undertow中的一个错误:https://issues.jboss.org/browse/UNDERTOW-375
您需要更新Undertow版本。
答案 1 :(得分:0)
使用JavaConfig在Spring中创建的应用程序存在同样的问题。我做的是从JavaConfig转到xml config。