WildFly 8.2 - Is it possible to deploy Spring MVC (.war) application without EE subsystem?
nitin.shukla Jul 3, 2015 1:39 AMHello,
I am looking to migrate one of my web application currently running on JBoss AS 7.1 to WildFly 8. After looking to migrate the application to JBoss AS 7.2 I released somewhere in this forum that AS 7.2 will issues with Java 8. Moving to Java 8 is another migration under consideration, hence zeroing on WildFly 8.
I downloaded the WildFly 8.2.Final today and attempting to configure my Web application with this version of server. After some effort in configuring the standalone.xml, I am currently facing issue at the server startup. I am getting below exception when deploying and starting the server.
2015-06-30 19:54:41,050 ERROR [MSC service thread 1-4:] [org.jboss.msc.service.fail] MSC000001: Failed to start service jboss.deployment.unit."pricing.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."pricing.war".PARSE: JBAS018733: Failed to process phase PARSE of deployment "pricing.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.wildfly.extension.undertow.deployment.WarMetaDataProcessor.deploy(WarMetaDataProcessor.java:368)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159)
... 5 more2015-06-30 19:54:41,064 ERROR [management-handler-thread - 2:] [org.jboss.as.controller.management-operation] JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "pricing.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"pricing.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"pricing.war\".PARSE: JBAS018733: Failed to process phase PARSE of deployment \"pricing.war\"
Caused by: java.lang.NullPointerException"}}
One of the problem I faced when configuring the standalone.xml is sub system - undertow. JBoss AS 7.1 had module org.jboss.as.web that is no more with WildFly 8. As I understand this module is replaced with module org.wildfly.extension.undertow in WildFly 8. However I am not sure if I have configure this correctly. Below are the configurations in AS 7.1 and WildFly 8.2
My AS 7.1 standalone.xml
<extensions> ... <extension module="org.jboss.as.web" /> ... </extensions> ... <subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false"> <configuration> <jsp-configuration tag-pooling="false" /> </configuration> <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" /> <virtual-server name="default-host" enable-welcome-root="true"> <alias name="localhost" /> <access-log pattern="%h %l %u %t "%r" %s %b %D"> <directory path="web" /> </access-log> </virtual-server> </subsystem>
My WildFly8.2 standalone.xml
<extensions> ... <extension module="org.wildfly.extension.io"/> <extension module="org.wildfly.extension.undertow"/> </extensions> <subsystems> ... <subsystem xmlns="urn:jboss:domain:io:1.1"> <worker name="default"/> <buffer-pool name="default"/> </subsystem> ... <subsystem xmlns="urn:jboss:domain:undertow:1.2"> <buffer-cache name="default"/> <server name="default-server"> <http-listener name="default" socket-binding="http"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <access-log pattern="%h %l %u %t "%r" %s %b %D" directory="web"/> </host> </server> <servlet-container name="default"> <jsp-config tag-pooling="false"/> <websockets/> </servlet-container> <handlers> <file name="welcome-content" path="${jboss.home.dir}/welcome-content" directory-listing="true"/> </handlers> </subsystem> </subsystems>
I am not sure if this is correct migration. Any help in resolving the issue I am facing will be appreciated.
Thanks.
Message was edited by: Nitin Shukla : Updated the host configuration in undertow subsystem to add access-log.