0 Replies Latest reply on Oct 30, 2008 11:29 AM by Nicola Ben

    Pages.xml + exception: NPE when setting view-id

    Nicola Ben Novice
      Hi,
      in pages.xml I need to manage a FileUloadException
      `<exception class="org.jboss.seam.web.FileUploadException">
              <redirect view-id="/protected/attachment/AttachmentEdit.xhtml">
                      <message severity="WARN">
                              #{messages['msgs.attachmentSizeException']}
                      </message>
              </redirect>
      </exception>`

      With vied-id as written I get this NPE:


      "11:22:41,823 WARN  [ExceptionFilter] running exception handlers
      11:22:41,845 ERROR [BaseXMLFilter] Exception in the filter chain
      javax.servlet.ServletException: java.lang.NullPointerException
              at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:126)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:51)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              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:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              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:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
              at java.lang.Thread.run(Thread.java:636)
      Caused by: java.lang.NullPointerException
              at org.jboss.seam.navigation.Pages.getStringValuesFromModel(Pages.java:761)
              at org.jboss.seam.navigation.Pages.encodePageParameters(Pages.java:940)
              at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:171)
              at org.jboss.seam.faces.Navigator.redirect(Navigator.java:50)
              at org.jboss.seam.exception.RedirectHandler.handle(RedirectHandler.java:51)
              at org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76)
              at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
              ... 34 more"


      If vied-id="/error-xhtml" it works without exception.

      I am using 2.1.0.GA.

      Is it a known problem?

      Bye
      Nic