2

I have very simple EAR with one spring mvc web app (war), all spring libraries are in myear.ear/lib folder.

I'm not using web.xml instead i'm trying to use WebApplicationInitializer but Wildfly server is not detecting this and i'm getting 404 page. But if i have spring-mvc libs inside WEB-INF/lib then its working.

Even I have put debug pointer at my WebApplicationInitializer implementation but it doesn't seem calling the onStartup method itself (and No error logged). Has anybody faced the same issue? Can anyone help?

Sreekanth
  • 539
  • 1
  • 7
  • 24
  • https://jira.spring.io/browse/SPR-12555. Its seems spring mvc works as designed, server wont recognize WebApplicationInitializer if spring-web.jar is not inside WEB-INF/lib. Possible solutions are discussed in the jira link above. – Sreekanth Dec 19 '14 at 04:27

2 Answers2

1

This got fixed in Wildfly 9.0.0 beta WFLY-4205

Sreekanth
  • 539
  • 1
  • 7
  • 24
  • Is this working for you now? I still get the same problem with Wildfly 9.0.2.Final. Do you happen to have a working example that you can share? – David Edwards Nov 06 '15 at 11:10
  • @DavidEdwards It was working... unsure about it now since we dropped the plan of WebInitializer now. – Sreekanth Dec 01 '15 at 13:28
  • Thanks for replying. I found in the end that I still had to add a `META-INF/services/javax.servlet.ServletContainerIntializer` file into each skinny war file. So the WFLY-4205 fix is better than nothing (since it won't work at all in Wildfly 8), but is not a total solution. – David Edwards Dec 01 '15 at 13:47
0

https://jira.spring.io/browse/SPR-12555 Its seems spring mvc works as designed, server wont recognize WebApplicationInitializer if spring-web.jar is not inside WEB-INF/lib. Possible solutions are discussed in the jira link above

Sreekanth
  • 539
  • 1
  • 7
  • 24