4 Replies Latest reply on Apr 5, 2011 6:10 PM by alesj

    JBoss 6 deployment issue -- simple example

    blaakso5577

      Hello all:

         Hope I get this first post correct!

       

      Here is the issue...

         I have a Spring MVC example that deploys and works fine when deployed as a WAR to Tomcat 7.

      However, when I deploy the WAR to JBoss 6, I cannot get the welcome JSP to display. I always get a 404 page.

      I also tried to deploy it as an EAR, same result.

      It seems strange to me considering that JBoss uses a Tomcat container, correct?

      This also happens on JBoss 5.0.1, although I did see some deployment exceptions on 5.0.1.

       

      There must be a configuration I missed.

      This is a first time unzip of the JBoss 6.0 Final. All configurations are default.

       

      I am deploying and starting both Tomcat and JBoss from Eclipse Helios, and I am using JBoss Tools.

      No spaces in the eclipse, eclipse workspace path or the JBoss home path.

      Using a windows XP box.

      Spring 2.5.6

      Java 6 update 24

       

      The context is started with the line:

      12:45:32,096 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] deploy, ctxPath=/Court-Annotation

       

      Deployment seems OK:

      12:45:32,299 DEBUG [org.jboss.deployers.plugins.deployers.DeployersImpl] Fully Deployed vfs:///C:/jboss-6.0.0.Final/server/default/deploy/Court-Annotation.war

       

      The project is deployed to the server/default/deploy directory as an exploded WAR.

      I can see all the pages and classes in the deployed WAR.

       

      There are no errors in the logs other than: (when I try to access the page)

      12:47:23,503 WARN  [org.springframework.web.servlet.PageNotFound] No mapping found for HTTP request with URI [/Court-Annotation/welcome.htm] in DispatcherServlet with name 'court'

       

      This part of the log seems strange to me. It loads the context, but then this line at the end.

      12:56:12,834 INFO  [TomcatDeployment] deploy, ctxPath=/

       

      12:56:12,600 INFO  [TomcatDeployment] deploy, ctxPath=/Court-Annotation

      12:56:12,678 INFO  [[/Court-Annotation]] Initializing Spring root WebApplicationContext

      12:56:12,678 INFO  [ContextLoader] Root WebApplicationContext: initialization started

      12:56:12,678 INFO  [XmlWebApplicationContext] Refreshing org.springframework.web.context.support.XmlWebApplicationContext@38dd52: display name [Root WebApplicationContext]; startup date [Tue Apr 05 12:56:12 CDT 2011]; root of context hierarchy

      12:56:12,678 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/court-service.xml]

      12:56:12,709 INFO  [XmlWebApplicationContext] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@38dd52]: org.springframework.beans.factory.support.DefaultListableBeanFactory@9fc304

      12:56:12,709 INFO  [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@9fc304: defining beans []; root of factory hierarchy

      12:56:12,709 INFO  [ContextLoader] Root WebApplicationContext: initialization completed in 31 ms

      12:56:12,709 INFO  [[/Court-Annotation]] Initializing Spring FrameworkServlet 'court'

      12:56:12,709 INFO  [DispatcherServlet] FrameworkServlet 'court': initialization started

      12:56:12,709 INFO  [XmlWebApplicationContext] Refreshing org.springframework.web.context.support.XmlWebApplicationContext@c14e1c: display name [WebApplicationContext for namespace 'court-servlet']; startup date [Tue Apr 05 12:56:12 CDT 2011]; parent: org.springframework.web.context.support.XmlWebApplicationContext@38dd52

      12:56:12,709 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/court-servlet.xml]

      12:56:12,756 INFO  [XmlWebApplicationContext] Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@c14e1c]: org.springframework.beans.factory.support.DefaultListableBeanFactory@f3e1fd

      12:56:12,772 INFO  [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@f3e1fd: defining beans [org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,messageSource,org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,viewResolver]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@9fc304

      12:56:12,803 INFO  [DispatcherServlet] FrameworkServlet 'court': initialization completed in 94 ms

      12:56:12,834 INFO  [TomcatDeployment] deploy, ctxPath=/

       

      Any ideas? Strange that this project works OK on Tomcat 7.0.

      I attached the zipped eclipse project and a screen shot of the build props

       

      Thank you for the help.