2 Replies Latest reply on Apr 21, 2008 2:17 PM by Jane Zhen

    JSFCLientSession creating exception for self-developped comp

    Jane Zhen Newbie

      Hi, I was trying to load a page first by creating a JSFClientSession:

      client = new JSFClientSession("/admin/configui/configSummary.jsf");

      and got following exception. In the page there is a self-developped component:

      <cwc:ajaxDataTable id="table" value="#{myBeanList.rows}"
       var="row"
       beanName="myBeanList"
       viewMode="#{param.cwcPrint}" >
      
       <h:column>
       <f:facet name="header">
       <cwc:ajaxSortHeader columnName="rank" immediate="false" title="{msgs.sortByRank}">
       <h:outputText value="{msgs.rank}"/>
       </cwc:ajaxSortHeader>
       </f:facet>
       <h:outputText value="#{row.rank}"/>
       </h:column>
       </cwc:ajaxDataTable>
      


      and the exception stack is:

      type="org.apache.cactus.internal.client.ServletExceptionWrapper">
      com.meterware.httpunit.HttpInternalErrorException: Error on HTTP request: 500 Internal Error [http://localhost:8080/webui/admin/configui/configSummary.jsf] at
      com.meterware.httpunit.WebClient.validateHeaders(WebClient.java:573) at
       com.meterware.httpunit.WebClient.updateClient(WebClient.java:464) at
      com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:139) at
      
      com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:130) at
      com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
      at
      com.meterware.httpunit.WebClient.getResponse(WebClient.java:113) at
      
       com.hp.ed.webui.HttpUnitTest.setUp(HttpUnitTest.java:46) at
      
      org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153) at
      
      org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119) at
      
      org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93) at
      
      org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224) at
      
      org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java) at
      
      org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101) at
      
      org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224) at
      
      org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java) at
      
      org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72) at
      org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224) at
      org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at
       org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:123) at
       org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at
      com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at
      com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at
      com.hp.ov.cwc.web.jsf.CwcExtensionsFilter.doFilter(CwcExtensionsFilter.java:107) at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at
      
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at
      com.hp.ed.webui.ConfigUIFilter.doFilter(ConfigUIFilter.java:24) at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at
      org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at
      org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at
      org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at
      org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595)
      


      Does anyone know what is wrong? This error has nothing to do with ajax component though, because although I switched to non-ajax version component, it still happened and it also happened for t:dataTable.

      Thanks
      Jane

        • 1. Re: JSFCLientSession creating exception for self-developped
          Jane Zhen Newbie

          I also tried to use HttpUnit alone based on the HelloJSFIntegrationTest sample code, and I got exception when calling webConversation.getResponse:

           WebRequest req = new GetMethodWebRequest(WebConversationFactory.getWARURL() + "/admin/configui/configSummary.jsf");
           this.webResponse = webConversation.getResponse(req);
          


          the exceptions were:

          com.meterware.httpunit.HttpInternalErrorException: Error on HTTP request: 500 Internal Error [http://localhost:8080/webui/admin/configui/configSummary.jsf] at com.meterware.httpunit.WebClient.validateHeaders(WebClient.java:573) at com.meterware.httpunit.WebClient.updateClient(WebClient.java:464) at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:139) at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:130) at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121) at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113) at com.hp.ed.webui.HttpUnitTest.setUp(HttpUnitTest.java:46) at org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153) at org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119) at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93) at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224) at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java) at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101) at org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224) at org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java) at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72) at org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224) at org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:123) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.hp.ov.cwc.web.jsf.CwcExtensionsFilter.doFilter(CwcExtensionsFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.hp.ed.webui.ConfigUIFilter.doFilter(ConfigUIFilter.java:24) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595)

          just for a bit more clue..

          • 2. Re: JSFCLientSession creating exception for self-developped
            Jane Zhen Newbie

            Problem solved! One point is to find out what went wrong, try to load the page directly in browser first. as it tell you a lot of more than just "Internal server error"

            Still one question remaining... does anyone know if replacing a real bean with a mock bean doable?