Cannot deploy Spring App to Websphere

后端 未结 7 1731
傲寒
傲寒 2020-12-31 09:28

I\'ve been developing an application to tomcat during development phase. As we\'re moving forward, my client wants to be deployed to websphere. I\'m attempting to do so on

7条回答
  •  醉话见心
    2020-12-31 10:17

    I faced the same issue too. My Spring MVC (Spring 4.3) Rest application was working on Jboss, but when I tried deploying on Websphere 8.5.5 I got the same error: SRVE0292I: Servlet Message - [app#app.war]:.No Spring WebApplicationInitializer types detected on classpath. I tried all the options suggested in this post and other posts, but nothing worked out. Finally I found the issue. When I created the Spring MVC Rest application I used maven archetype to create the project and it created the Spring MVC application with blank web.xml. As I planned to use Spring4, java based initialization, I left arechetype created web.xml like that and didn't configure my dispatcherServlet in web.xml. Jboss was intelligent enough to ignore blank web.xml and finding java initializer class and bringing the application up. Where as the same application deployed on WebSphere 8.5.5, WebSphere found the blank web.xml and looking for the DispatcherServlet info in the web.xml and not looking for the java initializer class. After removing the web.xml and redeploying the application is up on WebSphere.

提交回复
热议问题