2 Replies Latest reply on Dec 15, 2007 6:33 AM by Stan Silvert

    Reg:JSFUnit error

    kumar kumar Newbie

      hi everyone,

      i have got couple of issues with jsfunit....i started using jsfunit from the past 2 days....i have seen the getting started page and started to work out..but stuck up with some issues

      1. i was unable to run it from eclipse....becoz when i add the cactus-report.xsl in the root...its not taking it....

      so i need to create the war file and explicity add the cactus-report.xsl and then go to apache tomcat -- web-apps --- paste that and run from there




      i have taken that jsp as view.jsp ..which was given...


      2.after running from the tomcat i am getting these errors...

      TestCase com.foo.JSFUnitTest
      Name Status Type Time(s)
      testInitialPage Error Error on HTTP request: 404 /myjsfapp/index.faces [ http://localhost:8080/myjsfapp/index.faces]com.meterware.httpunit.HttpNotFoundException:
      Error
      on
      HTTP
      request:
      404
      /myjsfapp/index.faces
      [http://localhost:8080/myjsfapp/index.faces] at
      com.meterware.httpunit.WebClient.validateHeaders(WebClient.java:575) 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
      org.jboss.jsfunit.facade.JSFClientSession.doWebRequest(JSFClientSession.java:184) at
      org.jboss.jsfunit.facade.JSFClientSession.doInitialRequest(JSFClientSession.java:122) at
      org.jboss.jsfunit.facade.JSFClientSession.(JSFClientSession.java:75) at
      com.foo.JSFUnitTest.testInitialPage(JSFUnitTest.java:23) at
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native
      Method) at
      sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
      Source) at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
      Source) 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:290) at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at
      org.jboss.jsfunit.framework.JSFUnitFilter.doFilter(JSFUnitFilter.java:123) 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:233) at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at
      java.lang.Thread.run(Unknown
      Source)
      can any one plzz help me out with this...waiting for ur reply

        • 1. Re: Reg:JSFUnit error
          Manfred Maelzer Newbie

          I'm no expert, but my first guess is that there is no index.jsp file in the webapps root folder.

          Can you make sure that the file exists in the expected folder/context?

          Another good hint on why it may have failed may be found in the tomcat logfile(s) ...

          It might be that the tomcat application server did not initialize the application in the context properly. in this case tomcat returns a 404 error too. So maybe you had some startuplistener errors that are written to the tomcat log only.

          • 2. Re: Reg:JSFUnit error
            Stan Silvert Master

            I think TheSid is right. For whatever reason, it sounds like you are having trouble getting files into the root of your WAR. Sorry I can't help much with Eclipse as I don't use it.

            Stan