4 Replies Latest reply on Feb 3, 2009 12:14 AM by Prashanth N

    Application WAR File not working on JBoss 5.0

    Prashanth N Newbie

      Hi,

      I am new to JBoss 5.0.0 although I have been using JBoss 4.2.x for a while now. We have an application built using ICEfaces, Spring and Hibernate. I have been successful in managing to make changes to the application and deploy it on JBoss 5.0.0 without any startup errors. I am using it with Sun JDK 1.5.0_14 on Linux.

      However, when I invoke any application URL, I get the following error:

      [Persistent Faces Servlet]] (http-0.0.0.0-8080-1) Servlet.service() for servlet Persistent Faces Servlet threw exception
      javax.servlet.ServletException: OncePerRequestFilter just supports HTTP requests
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:62)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:595)

      We are eager to move our application to JBoss 5 and we are severly gated because of the issue. If I deploy the same WAR file on 4.2.2 it works like a charm without any changes.

      Please, please help!

      Thanks & Regards,
      Prash

        • 1. Re: Application WAR File not working on JBoss 5.0
          jaikiran pai Master

          Do you by any chance package jars in your application which contain javax.servlet.* classes? If yes, remove those jars from your application packaging.

          If that doesn't work, please provide more details about your application including the console logs.

          While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.

          • 2. Re: Application WAR File not working on JBoss 5.0
            Prashanth N Newbie

            Hi Jaikiran,

            It worked!! Thanks a ton for your reply..
            I am now getting login page. However, when I click login button, I land onto different problem.. I get following exception:

            org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [WEB-INF/applicationContext.xml] cannot be opened because it does not exist


            applicationContext.xml is very much in WEB-INF folder. Hitherto in 4.2.2 AS we used to put this in the WAR file in WEB-INF folder.

            Please advise me if I am missing something.

            Thanks & Regards,
            Prash

            • 3. Re: Application WAR File not working on JBoss 5.0
              Prashanth N Newbie

              Sorry forgot to tell you what I did to resolve earlier error. As you mentioned I searched for jars in WEB-INF/lib folder which contains javax.servlet.*. I removed servlet-api.jar & jstl.jar. Then it started to work!!

              Thanks & Regards,
              Prash

              • 4. Re: Application WAR File not working on JBoss 5.0
                Prashanth N Newbie

                Hi,

                Is there any change in terms of classloader policy or the default way Web / War related classloaders work in JBoss 5 & 4?

                I am consistently getting this error. I am unable to get access to resources in WEB-INF/ folder. I used to put Spring's applicationContext.xml file in this folder and used to access using ClassPathXmlApplicationContext. This used to work fine in JBoss 4.2.x.

                I get this exception:
                org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [WEB-INF/applicationContext.xml] cannot be opened because it does not exist

                Please help!!

                Thanks & Regards,
                Prash