5 Replies Latest reply on Feb 26, 2009 3:33 AM by Vasu Srirambhatla

    Getting FailingHttpStatusCodeException :when running more th

    Vasu Srirambhatla Newbie

      Hi All ,

      When I am running to run more than one test case scenario in a test case,except the first one ,rest fail with the following error..

      500 Internal Server Error for http://localhost:7001/cso/pages/order/ordersummary.jsf

      com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 500 Internal Server Error for http://localhost:7001/cso/pages/order/ordersummary.jsf
      at com.gargoylesoftware.htmlunit.WebClient.throwFailingHttpStatusCodeExceptionIfNecessary(WebClient.java:525)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:328)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:384)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:369)
      at org.jboss.jsfunit.framework.SimpleInitialRequestStrategy.doInitialRequest(SimpleInitialRequestStrategy.java:47)
      at org.jboss.jsfunit.framework.WebClientSpec.doInitialRequest(WebClientSpec.java:232)
      at org.jboss.jsfunit.jsfsession.JSFSession.(JSFSession.java:80)
      at org.jboss.jsfunit.jsfsession.JSFSession.(JSFSession.java:59)
      at com.convergys.cso.test.jsfunit.order.OrderSummaryTest.setUp(OrderSummaryTest.java:32)
      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)


      Here is what I am seeing in my console



      <Feb 23, 2009 3:48:02 PM IST> <BEA-101362> <[weblogic.servlet.internal.WebAppServletContext@d85409 - appName: 'CSOEAR', name: 'cso', context-path: '/cso'] could not deserialize the servlet-context scoped attribute with name: "org.richfaces.util.RenderPhaseComponentVisitorUtils"
      java.io.NotSerializableException: org.ajax4jsf.component.RenderPhaseUIDataAdaptorVisitor
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
      at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
      at weblogic.common.internal.PassivationUtils.toByteArray(PassivationUtils.java:33)
      Truncated. see log file for complete stacktrace
      >
      <Feb 23, 2009 3:48:02 PM IST> <BEA-101362> <[weblogic.servlet.internal.WebAppServletContext@d85409 - appName: 'CSOEAR', name: 'cso', context-path: '/cso'] could not deserialize the servlet-context scoped attribute with name: "org.richfaces.util.RenderPhaseComponentVisitorUtils"
      java.io.NotSerializableException: org.ajax4jsf.component.RenderPhaseUIDataAdaptorVisitor
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
      at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
      at weblogic.common.internal.PassivationUtils.toByteArray(PassivationUtils.java:33)
      Truncated. see log file for complete stacktrace
      >
      <Feb 23, 2009 3:48:02 PM IST> <BEA-101002> <[weblogic.servlet.internal.WebAppServletContext@d85409 - appName: 'CSOEAR', name: 'cso', context-path: '/cso'] Could not deserialize the context attribute.
      java.io.NotSerializableException: org.ajax4jsf.component.RenderPhaseUIDataAdaptorVisitor
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
      at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
      at weblogic.common.internal.PassivationUtils.toByteArray(PassivationUtils.java:33)
      Truncated. see log file for complete stacktrace
      >

      Feb 23, 2009 3:48:09 PM com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/pages/order/ordersummary.jsp]
      java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
      at org.springframework.web.jsf.FacesContextUtils.getRequiredWebApplicationContext(FacesContextUtils.java:83)
      at org.springframework.web.jsf.DelegatingVariableResolver.getWebApplicationContext(DelegatingVariableResolver.java:152)
      at org.springframework.web.jsf.DelegatingVariableResolver.getBeanFactory(DelegatingVariableResolver.java:141)
      at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:117)
      at com.sun.faces.el.VariableResolverChainWrapper.getValue(VariableResolverChainWrapper.java:100)
      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
      at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
      at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:68)
      at com.sun.el.parser.AstValue.getValue(AstValue.java:107)
      at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
      at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
      at org.richfaces.component.html.HtmlTree.getNodeFace(HtmlTree.java:1082)
      at org.richfaces.component.UITree.getNodeFacet(UITree.java:277)
      at org.richfaces.renderkit.TreeRendererBase$2.processNode(TreeRendererBase.java:614)
      at org.richfaces.model.TreeDataModel.doWalk(TreeDataModel.java:111)
      at org.richfaces.model.TreeDataModel.walk(TreeDataModel.java:183)
      at org.richfaces.component.UITree.walk(UITree.java:407)
      at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:627)
      at org.richfaces.renderkit.TreeRendererBase.encodeChildren(TreeRendererBase.java:573)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
      at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
      at org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
      at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
      at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:286)
      at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:281)
      at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
      at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
      at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271)
      at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
      at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
      at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
      at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271)
      at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:196)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      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 weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(Unknown Source)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
      after - RENDER_RESPONSE 6


      When I am trying to access the page I am testing i am getting


      java.lang.IllegalArgumentException: Value: java.lang.Object@1fdbab5 of org.richfaces.CONTROL_SKINNING_LEVEL init parameter is invalid! Only extended, basic can be used
      at org.ajax4jsf.context.ViewResources.initialize(ViewResources.java:602)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:208)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)


      Note:I am able to run individual test case senario.
      After restarting the server the first test case senario that gets called is running fine.

      I am not sure on what is going wrong.

      Any help would be appreciated...


        • 1. Re: Getting FailingHttpStatusCodeException :when running mor
          Stan Silvert Master

          I haven't seen this before. What do you mean by "I am running more than one test case scenario"? Do you mean two tests running at the same time?

          Please post your test code.

          Stan

          • 2. Re: Getting FailingHttpStatusCodeException :when running mor
            Vasu Srirambhatla Newbie

            Hi Stan ,

            yes ,I was what i ment

            here is the test case

            package com.convergys.cso.test.jsfunit.order;

            import java.io.IOException;

            import junit.framework.Test;
            import junit.framework.TestSuite;

            import org.jboss.jsfunit.jsfsession.JSFClientSession;
            import org.jboss.jsfunit.jsfsession.JSFServerSession;
            import org.jboss.jsfunit.jsfsession.JSFSession;
            import org.jboss.jsfunit.richclient.RichFacesClient;
            import org.richfaces.component.UITabPanel;
            import org.richfaces.component.html.HtmlTab;
            import org.xml.sax.SAXException;

            public class OrderSummaryTest extends org.apache.cactus.ServletTestCase {
            private JSFSession jsfSession;
            private JSFClientSession client;
            private RichFacesClient ajaxClient;
            private JSFServerSession server;

            // JUnit suite() method
            public static Test suite() {
            return new TestSuite(OrderSummaryTest.class);
            }

            // optional JUnit setUp() method
            public void setUp() throws IOException, SAXException {
            this.jsfSession = new JSFSession("/pages/order/ordersummary.jsf");
            this.client = jsfSession.getJSFClientSession();
            this.ajaxClient = new RichFacesClient(this.client);
            this.server = jsfSession.getJSFServerSession();
            }

            public void tearDown() throws Exception {
            System.out.println("Calling Tear Down");
            this.jsfSession = null;
            this.client = null;
            this.ajaxClient = null;
            this.server = null;
            }

            // one or more JUnit test methods
            public void testOfferTab() throws IOException, SAXException {

            UITabPanel panel = (UITabPanel) server.findComponent("tabPanel");
            String selectedTab = (String) panel.getSelectedTab();
            assertEquals("offerTab", selectedTab);

            }

            public void testEquipmentTab() throws IOException {
            UITabPanel panel = (UITabPanel) server.findComponent("tabPanel");

            String selectedTab = (String) panel.getSelectedTab();


            ajaxClient.clickTab("equipmentTab");
            HtmlTab panel1 = (HtmlTab) server.findComponent("equipmentTab");



            selectedTab = (String) panel1.getName();
            assertEquals("equipmentTab", selectedTab);
            }

            public void testServiceTab() throws IOException {
            UITabPanel panel = (UITabPanel) server.findComponent("tabPanel");

            String selectedTab = (String) panel.getSelectedTab();


            ajaxClient.clickTab("serviceTab");
            HtmlTab panel1 = (HtmlTab) server.findComponent("serviceTab");


            selectedTab = (String) panel1.getName();
            assertEquals("serviceTab", selectedTab);
            }

            }

            • 3. Re: Getting FailingHttpStatusCodeException :when running mor
              Vasu Srirambhatla Newbie

              hi stan,

              Interestingly it worked when I commented tearDown.
              Do you know the reason ?

              • 4. Re: Getting FailingHttpStatusCodeException :when running mor
                Stan Silvert Master

                I can't imagine why that would have any effect. I don't see where you are running more than one test at the same time. If you are kicking off tests with two separate processes then that should work.

                The only time you run into a problem is when the same test thread creates more than one JSFSession.

                See http://www.jboss.org/community/docs/DOC-10971

                Stan

                • 5. Re: Getting FailingHttpStatusCodeException :when running mor
                  Vasu Srirambhatla Newbie

                  Hi Stan ,

                  You were correct.I noticed that tearDown was failing with some exception.
                  So that might be a reason to end up into this situation.

                  Thanks a lot for your help