I am using Spring Tool Suite 2.5.2
IDE and tried springtravel application provided with STS.
Application worked fine with tomcat6 but not working with Jboss5.1, I am using jdk 6 update 24.
My findings are that while deploying war file application server is not resolving URL mappings defined using annotations.Following are startup logs from both servers.
Log from Jboss
21:50:53,734 INFO [STDOUT] DEBUG: org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping - Looking for URL mappings in application context: org.springframework.web.context.support.XmlWebApplicationContext@830910: display name [WebApplicationContext for namespace 'Spring MVC Dispatcher Servlet-servlet']; startup date [Tue Apr 19 21:50:50 IST 2011]; root of context hierarchy
21:50:53,734 INFO [STDOUT] DEBUG: org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalRequiredAnnotationProcessor': no URL paths identified
21:50:53,734 INFO [STDOUT] DEBUG: org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor': no URL paths identified
21:50:53,734 INFO [STDOUT] DEBUG: org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalCommonAnnotationProcessor': no URL paths identified
21:50:53,734 INFO [STDOUT] DEBUG: org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalPersistenceAnnotationProcessor': no URL paths identified
Log from tomcat, lines in red are missing in Jboss log.It is not processing URL mapping defined by annotations.
DEBUG: org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping - Looking for URL mappings in application context: org.springframework.web.context.support.XmlWebApplicationContext@6551c1: display name [WebApplicationContext for namespace 'Spring MVC Dispatcher Servlet-servlet']; startup date [Tue Apr 19 21:49:11 IST 2011]; root of context hierarchy
DEBUG: org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping - Rejected bean name 'stubHotelSearchService': no URL paths identified
DEBUG: org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping - Mapped URL path [/hotels/*] onto handler [com.springsource.springtravel.hotels.web.HotelsController@143c268]
DEBUG: org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping - Mapped URL path [/hotels/*.*] onto handler [com.springsource.springtravel.hotels.web.HotelsController@143c268]
DEBUG: org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalRequiredAnnotationProcessor': no URL paths identified
DEBUG: org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor': no URL paths identified
DEBUG: org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping - Rejected bean name 'org.springframework.context.annotation.internalCommonAnnotationProcessor': no URL paths identified
Mappings in class looks like
Have anyone faced this issue earlier or any suggestion and clues about workarounds?
Thanks