4

I would love to serve Spring Web MVC as a module in Wildfly but somehow the servlet (WebApplicationInitializer) doesn't seem to be starting.

module.xml

modules/org/springframework/4.0.0.RELEASE/module.xml

<module xmlns="urn:jboss:module:1.3" name="org.springframework" slot="4.0.0.RELEASE">
  <resources>
    <resource-root path="aopalliance-1.0.jar"/>
    <resource-root path="spring-aop-4.0.0.RELEASE.jar"/>
    <resource-root path="spring-beans-4.0.0.RELEASE.jar"/>
    <resource-root path="spring-context-4.0.0.RELEASE.jar"/>
    <resource-root path="spring-context-support-4.0.0.RELEASE.jar"/>
    <resource-root path="spring-core-4.0.0.RELEASE.jar"/>
    <resource-root path="spring-expression-4.0.0.RELEASE.jar"/>
    <resource-root path="spring-jdbc-4.0.0.RELEASE.jar"/>
    <resource-root path="spring-orm-4.0.0.RELEASE.jar"/>
    <resource-root path="spring-tx-4.0.0.RELEASE.jar"/>
    <resource-root path="spring-web-4.0.0.RELEASE.jar"/>
    <resource-root path="spring-webmvc-4.0.0.RELEASE.jar"/>
    <resource-root path="spring-mobile-device-1.1.1.RELEASE.jar"/>
  </resources>
</module>

Then I went back to my Maven project and scoped all dependencies with scope provided. When deploying the project in Wildfly everything seems to be ok.

20:47:27,166 DEBUG [org.jboss.as.server.deployment] (MSC service thread 1-13) Adding dependency ModuleDependency [identifier=org.springframework:4.0.0.RELEASE, moduleLoader=Service Module Loader, export=true, optional=false, importServices=false] to module deployment.myapp.war:main

20:47:27,257 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) JBAS017534: Registered web context: /myapp

20:47:27,269 INFO [org.jboss.as.server] (XNIO-1 task-7) JBAS018559: Deployed "myapp.war" (runtime-name : "myapp.war")

Applications deployed with the Spring libraries bundled run fine. What could be the problem?

Community
  • 1
  • 1
Bart
  • 17,070
  • 5
  • 61
  • 80
  • Did you manage to get a solution for this issue? I'm getting exactly the same behaviour and would appreciate the help. – n002213f Mar 31 '16 at 04:56

1 Answers1

0

The question related to 27545230 from which i got the solution.

Based on https://jira.spring.io/browse/SPR-12555 i created a jar with the services and managed to start the Spring application.

Community
  • 1
  • 1
n002213f
  • 7,805
  • 13
  • 69
  • 105