14 Replies Latest reply on May 27, 2008 12:48 PM by Stan Silvert

    error while runinng my test case

    burela gupta Newbie

      Hi,
      i am new to jsfunit . and i followed the documentation .while executing my first test case i am getting the following error .

      My test case
      -------------------------------------------------------------------------
      /**
      * The initial page was called up in the setUp() method. This shows
      * some simple JSFUnit tests you can do on that page.
      */
      public void testInitialPage() throws IOException, SAXException
      {
      this.client = new JSFClientSession("/myapp/home/home.faces?");
      JSFServerSession server = new JSFServerSession(client);

      UIComponent prompt = server.findComponent("validateEquitiesForm:filterSearch:filterCreatedBy");
      assertTrue(prompt.isRendered());

      }
      --------------------------------------------------------------------------------

      (in console.....................)
      -------------------------------------------------------------------------------------

      ERROR org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase Wrong columns attribute for PanelGrid validateEquitiesForm:headerPage:_id6: -2147483648
      ERROR org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase Wrong columns attribute for PanelGrid validateEquitiesForm:headerPage:_id21: -2147483648
      ERROR org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase Wrong columns attribute for PanelGrid validateEquitiesForm:headerPage:_id25: -2147483648
      ERROR org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase Wrong columns attribute for PanelGrid validateEquitiesForm:_id42: -2147483648
      ERROR org.apache.myfaces.renderkit.html.HtmlResponseStateManager No component states to be saved in client response!
      ERROR org.apache.catalina.core.StandardWrapperValve Servlet.service() for servlet FacesServlet threw exception
      java.lang.IllegalStateException
      at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:421)
      at com.sun.faces.context.FacesContextImpl.getExternalContext(FacesContextImpl.java:136)
      at org.jboss.jsfunit.context.JSFUnitFacesContext.release(JSFUnitFacesContext.java:193)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:92)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at com.jpmorgan.ibclover.filter.CloverCredentialsFilter.doFilter(CloverCredentialsFilter.java:88)
      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)

      ......................................................................................................


      (In browser ----------------)

      ----------------------------------------------------------------------------------

      Error in JSFClientSession constructor. /clover/home/home.faces?sid=O023384&appId=1&appName=CLOVER probably does not map to FacesServlet in web.xml. See full URL in HttpException.

      java.lang.IllegalArgumentException: Error in JSFClientSession constructor. /clover/home/home.faces?sid=O023384&appId=1&appName=CLOVER probably does not map to FacesServlet in web.xml. See full URL in HttpException.
      at org.jboss.jsfunit.facade.JSFClientSession.doInitialRequest(JSFClientSession.java:135)
      at org.jboss.jsfunit.facade.JSFClientSession.(JSFClientSession.java:82)
      at com.test.SimplifiedHelloJSFIntegrationTest.setUp(SimplifiedHelloJSFIntegrationTest.java:89)
      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:122)
      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)
      Caused by: com.meterware.httpunit.HttpInternalErrorException: Error on HTTP request: 500 Internal Error [http://localhost:8080/ibclover/clover/home/home.faces?sid=O023384&appId=1&appName=CLOVER]
      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 org.jboss.jsfunit.facade.JSFClientSession.doWebRequest(JSFClientSession.java:200)
      at org.jboss.jsfunit.facade.JSFClientSession.doInitialRequest(JSFClientSession.java:131)
      ... 33 more

      ------------------------------------------------------------------------------------


      is it neccessary to keep ids for each JSF components? please help me how to resolve the above issue.

      Thanks
      burula

        • 1. Re: error while runinng my test case
          Stan Silvert Master

          What do you mean by, "The initial page was called up in the setUp() method"?

          What is in your setUp() method?

          A JSFUnit test usually starts with a call to the JSFClientSession constructor, passing in a partial URL that excludes the base. So if the URL I use to start the application from the browser looks like this:

          http://localhost:8080/myapp/index.faces


          Then the first line of my JSFUnit code would look like this:

          JSFClientSession client = new JSFClientSession("/index.faces");


          Stan

          • 2. Re: error while runinng my test case
            burela gupta Newbie

            Hi Stan,
            Thanks for ur reply
            This is my test case:
            ............................................................................................................
            public class SimplifiedHelloJSFIntegrationTest extends ServletTestCase
            {
            private JSFClientSession client;

            /**
            * Start a JSFUnit session by getting the /index.faces page.
            */
            public void setUp() throws IOException, SAXException
            {
            // Initial JSF request
            this.client = new JSFClientSession("/home/home.faces?sid=O023384&appId=1&appName=CLOVER");
            }

            /**
            * @return the suite of tests being tested
            */
            public static Test suite()
            {
            return new TestSuite( SimplifiedHelloJSFIntegrationTest.class );
            }

            /**
            * The initial page was called up in the setUp() method. This shows
            * some simple JSFUnit tests you can do on that page.
            */
            public void testInitialPage() throws IOException, SAXException
            {
            JSFServerSession server = new JSFServerSession(client);
            assertEquals(server.getCurrentViewID(), server.getFacesContext().getViewRoot().getViewId());

            UIComponent prompt = server.findComponent("validateEquitiesForm:requestTable");
            assertTrue(prompt.isRendered());
            }
            }
            ...........................................................................................................


            But still i am getting the same error

            Please help me

            Thanks,
            Burela

            • 3. Re: error while runinng my test case
              Stan Silvert Master

              I just noticed. It looks like you are mixing two different JSF implementations. In the stack trace, I see classes from both MyFaces and the JSF RI.

              ERROR org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase Wrong columns attribute for PanelGrid validateEquitiesForm:headerPage:_id6: -2147483648
              ERROR org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase Wrong columns attribute for PanelGrid validateEquitiesForm:headerPage:_id21: -2147483648
              ERROR org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase Wrong columns attribute for PanelGrid validateEquitiesForm:headerPage:_id25: -2147483648
              ERROR org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase Wrong columns attribute for PanelGrid validateEquitiesForm:_id42: -2147483648
              ERROR org.apache.myfaces.renderkit.html.HtmlResponseStateManager No component states to be saved in client response!
              ERROR org.apache.catalina.core.StandardWrapperValve Servlet.service() for servlet FacesServlet threw exception
              java.lang.IllegalStateException
              at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:421)

              • 4. Re: error while runinng my test case
                Stan Silvert Master

                If you are using JBoss AS 4.2.x or 5.0, see http://wiki.jboss.org/wiki/JBoss5AndMyFaces

                Stan

                • 5. Re: error while runinng my test case
                  burela gupta Newbie

                  Hi Stan

                  i didn't catch you properly ,could you please explain me in more detail.

                  and also let me know (in detail) what are all the jar files to be included for running test case .

                  I am using......
                  1)jboss-jsfunit-core-1.0.0.Beat2.jar
                  2)jboss-jsfunit-richfaces-1.0.0.Beat2.jar
                  3)jboss-jsfunit-ant-1.0.0.Beta2.jar.

                  We are using 3 implemetations in our project.
                  MyFaces,RichFaces&MRM Component

                  What's the problem with these implementaions?
                  is it we should not mix these 3 implementations?

                  Please help me.

                  Thanks,
                  Burela


                  • 6. Re: error while runinng my test case
                    Stan Silvert Master

                    You should never mix the MyFaces JSF implementation with the Sun JSF implementation. These are two different implementations of the same thing.

                    From the stack trace, I can see that you have both jsf-impl.jar (as evidenced by the presence of com.sun.faces.context.FacesContextImpl) and myfaces-impl.jar (as evidenced by the presence of org.apache.myfaces.renderkit.html.HtmlResponseStateManager) in your classpath. You should never have both of these jars in your classpath.

                    Stan

                    • 7. Re: error while runinng my test case
                      burela gupta Newbie

                      Hi Stan

                      the following error i am getting for now.could you please help me in resolving the same
                      --------------------------------------------------------------------------------------
                      --------------------------------------------------------------------------------------
                      Status Type
                      Error getAttribute: Session already invalidated

                      java.lang.IllegalStateException: getAttribute: Session already invalidated
                      at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1021)
                      at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:110)
                      at org.jboss.jsfunit.framework.FacesContextBridge.getCurrentInstance(FacesContextBridge.java:53)
                      at org.jboss.jsfunit.facade.ClientIDs.(ClientIDs.java:60)
                      at org.jboss.jsfunit.facade.JSFClientSession.updateInternalState(JSFClientSession.java:211)
                      at org.jboss.jsfunit.facade.JSFClientSession.doWebRequest(JSFClientSession.java:201)
                      at org.jboss.jsfunit.facade.JSFClientSession.doInitialRequest(JSFClientSession.java:131)
                      at org.jboss.jsfunit.facade.JSFClientSession.(JSFClientSession.java:82)
                      at com.test.SimplifiedHelloJSFIntegrationTest.setUp(SimplifiedHelloJSFIntegrationTest.java:89)
                      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:122)
                      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)

                      ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------Thanx
                      Burela[/img]

                      • 8. Re: error while runinng my test case
                        burela gupta Newbie

                        Hi Stan

                        while running the test case i am getting error on browser but not on console .While running my application url seperately i am not getting any error .
                        ...........................................................................................................

                        Error getAttribute: Session already invalidated

                        java.lang.IllegalStateException: getAttribute: Session already invalidated
                        at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1021)
                        at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:110)
                        at org.jboss.jsfunit.framework.FacesContextBridge.getCurrentInstance(FacesContextBridge.java:53)
                        at org.jboss.jsfunit.facade.ClientIDs.(ClientIDs.java:60)
                        at org.jboss.jsfunit.facade.JSFClientSession.updateInternalState(JSFClientSession.java:211)
                        at org.jboss.jsfunit.facade.JSFClientSession.doWebRequest(JSFClientSession.java:201)
                        at org.jboss.jsfunit.facade.JSFClientSession.doInitialRequest(JSFClientSession.java:131)
                        at org.jboss.jsfunit.facade.JSFClientSession.(JSFClientSession.java:82)
                        at com.test.SimplifiedHelloJSFIntegrationTest.setUp(SimplifiedHelloJSFIntegrationTest.java:89)
                        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:122)
                        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)
                        ............................................................................................................

                        • 9. Re: error while runinng my test case
                          Stan Silvert Master

                          The error says that your session has been invalidated. I assume that something in your application or maybe a filter has called HttpSession.invalidate().

                          Since you are starting the initial request with:
                          /home/home.faces?sid=O023384&appId=1&appName=CLOVER

                          I wonder what the "sid=O023384&appId=1&appName=CLOVER" part is needed for? I would suspect that whatever logic these parameters trigger has something to do with the invalidated session.

                          Stan

                          • 10. Re: error while runinng my test case
                            burela gupta Newbie

                            hi Stan,

                            Our's is a portal application which is purely developed using the struts frame work. where this application takes input as SID(Example O023384),user clicks the Sign-In link from which the next screen will have access to four applications.one among the four links is my application Named "CLOVER"(Devloped using JSF/Hibernate/spring).Instead of accessing my application(CLOVER) from the PORTAL i am accessing my application directly there i am giving URL as

                            /home/home.faces?sid=O023384&appId=1&appName=CLOVER .

                            and also let me to notice you that in our application One of the class is calling method HttpSession.invalidate(); i am not sure what for they are calling this method . please help me.

                            Thanx
                            burela

                            • 11. Re: error while runinng my test case
                              burela gupta Newbie

                              Hi Stan,
                              I have commented session.invalidate() method....
                              Now the test case is passed.
                              Thanks lot for your suggestion.
                              But in my JSP we are using......

                              org.semanticprogrammer.semanticfaces.component.UIAction.

                              We have one link like....
                              <s:actionLink id="clickhere" label="GO To Application" action="#{cpHeaderBean.loadAppl} " style="color:#5f5f5f;text-decoration: none;"/>


                              I tried .....
                              client.clickLink("clickhere");
                              client.clickCommandLink("clickhere");

                              both are giving error like........................................................................

                              clickLink() is only valid on components of type javax.faces.component.html.HtmlOutputLink. 'createRequest' is of type org.semanticprogrammer.semanticfaces.component.UIAction.

                              org.jboss.jsfunit.facade.ComponentTypeException: clickLink() is only valid on components of type javax.faces.component.html.HtmlOutputLink. 'clickhere' is of type org.semanticprogrammer.semanticfaces.component.UIAction.
                              at org.jboss.jsfunit.facade.ComponentTypeException.check(ComponentTypeException.java:65)
                              at org.jboss.jsfunit.facade.JSFClientSession.clickLink(JSFClientSession.java:443)
                              at com.jpmorgan.test.TestHome.testInitialPage(TestHome.java:67)
                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                              ...........................................................................................................


                              I didn't find any method from the API for <s:actionLink/>
                              Please tell me which method i have to use for testing.


                              Thanks,
                              Burela.

                              • 12. Re: error while runinng my test case
                                Stan Silvert Master

                                Hi,

                                Glad you got things up and running. From now on, please start a new topic when you have a new question.

                                JSFUnit doesn't support all JSF components yet. It currently only supports the standard components and most of the RichFaces components. But our move from HttpUnit to HtmlUnit should help this. Using HtmlUnit, we should be able to support any JSF component library. See http://www.jboss.com/index.html?module=bb&op=viewtopic&t=136280

                                Regards,

                                Stan

                                • 13. Re: error while runinng my test case
                                  burela gupta Newbie

                                  Hi Stan,

                                  could you please name the JAR file Which supports the HtmlUnit.....

                                  thanx,
                                  Nara.

                                  • 14. Re: error while runinng my test case
                                    Stan Silvert Master

                                    Please start a new topic when you have a new question.

                                    Thanks,

                                    Stan