2 Replies Latest reply on Apr 11, 2011 1:32 AM by Christy Christy

    Exception without cause

    Christy Christy Novice

      Hi!

      I have the seam application that successfully works on one server. I just copied it to another server. It deploys fine with no errors. But when I try to invoke it I have the debug page with no exception cause. I just have this exception:

       

      Exception during request processing:                Caused by javax.servlet.ServletException with message: "Servlet execution threw an exception"       

      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      logging.BaseEncodeFilter.doFilter(BaseEncodeFilter.java:26)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
      org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Thread.java:619)

      I was trying to catch the exception with my custom Filter:

       

      public class BaseEncodeFilter implements

              javax.servlet.Filter {

          private javax.servlet.FilterConfig myFilterConfig;

       

          public BaseEncodeFilter() {

          }

       

          public void doFilter(

                  javax.servlet.ServletRequest servletRequest,

                  javax.servlet.ServletResponse servletResponse,

                  javax.servlet.FilterChain filterChain)

                  throws java.io.IOException,

                  javax.servlet.ServletException {

              System.out.println(" doFilter " );

              try{

                  System.out.println(" before try");

              filterChain.doFilter(servletRequest,

                      servletResponse);

                  System.out.println(" after try");

       

              }catch(Throwable e) {

                  e.printStackTrace();

                  System.out.println("Stack trace:");

                  System.out.println(e.getStackTrace());

                  System.out.println("Cause:");

                  System.out.println(e.getCause());

              }

          }

       

          public javax.servlet.FilterConfig getFilterConfig() {

              System.out.println("getFilterConfig" );

              return myFilterConfig;

          }

       

          public void setFilterConfig(

                  javax.servlet.FilterConfig filterConfig) {

              System.out.println("setFilterConfig" );

       

              myFilterConfig = filterConfig;

          }

       

          public void init (javax.servlet.FilterConfig filterConfig){

              System.out.println("init filterConfig" );

           myFilterConfig = filterConfig;

          }

          public void destroy(){

            myFilterConfig = null;

          }

      }

      in web.xml:

       

      <filter>

          <filter-name>Errors Filter</filter-name>

          <filter-class>logging.BaseEncodeFilter</filter-class>

        </filter>

        <filter-mapping>

          <filter-name>Errors Filter</filter-name>

          <url-pattern>/*</url-pattern>

        </filter-mapping>

       

      But it does not catch any errors, it "says" than everything is ok. Please help!

       

      Best regards,

      Kristina