3 Replies Latest reply on Dec 24, 2008 7:06 PM by he youlin

    MockViewHandler throws Exception after moving to SEAM 2.1.1

    Noah White Newbie

      Hi,


      I have a Web service, which is a SSB and is not a SEAM component, in my application. When using SEAM 2.0.3 CR1 the Web Service worked great. When I switched over to SEAM 2.1.1. GA I started getting the following exception when a client tries to use it:



      |[#|2008-12-23T18:48:28.484-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=19;_ThreadName=httpSSLWorkerThread-80-0;_RequestID=4c3415dd-d11b-436f-868e-7785cf217b62;|StandardWrapperValve[WSServlet]: PWC1406: Servlet.service() for servlet WSServlet threw exception
      java.lang.IllegalArgumentException: no file extension in servlet path: /upload
           at org.jboss.seam.mock.MockViewHandler.getActionURL(MockViewHandler.java:45)
           at org.jboss.seam.jsf.SeamViewHandler.getActionURL(SeamViewHandler.java:74)
           at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:168)
           at org.jboss.seam.faces.Redirect.execute(Redirect.java:149)
           at org.jboss.seam.exception.DebugPageHandler.handle(DebugPageHandler.java:32)
           at org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76)
           at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
           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.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
           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:230)|
      



      This is under Glassfish and my sun-jaxws.xml is simply:


      <endpoints xmlns='http://java.sun.com/xml/ns/jax-ws/ri/runtime' version='2.0'>
          <endpoint
              name='gent_upload'
              implementation='com.mvt.gent.ws.UploadImpl'
              url-pattern='/upload'/>
      </endpoints>



      Again this all worked fine under 2.0.3 CR2. Thanks,


      -Ned

        • 1. Re: MockViewHandler throws Exception after moving to SEAM 2.1.1
          Noah White Newbie

          FWIW I tried adding an extention to my ws and made it /upload.ws. Now I get the following exception in place of the other one:



          [#|2008-12-23T19:46:27.234-0500|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=19;_ThreadName=httpSSLWorkerThread-80-0;|19:46:27,234 DEBUG [DebugPageHandler] redirecting to debug page
          
          java.lang.NullPointerException
          
               at org.jboss.seam.web.MultipartRequestImpl.parseRequest(MultipartRequestImpl.java:388)
          
               at org.jboss.seam.web.MultipartRequestImpl.getParameterNames(MultipartRequestImpl.java:520)
          
               at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:84)
          
               at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
               at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          
               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.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
          
               at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          
               at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          



          • 2. Re: MockViewHandler throws Exception after moving to SEAM 2.1.1
            he youlin Novice
            
            see JBSEAM-3448
            
            change MultipartFilter.java to
            
             // Force the request to be parsed now
               if(httpRequest.getHeader("soapaction")==null)
                  multipartRequest.getParameterNames();
            
            

            • 3. Re: MockViewHandler throws Exception after moving to SEAM 2.1.1
              he youlin Novice
              
              or you can use
              <web:multipart-filter create-temp-files="true" max-request-size="1000000" url-pattern="*.seam"/>