Cactus
  1. Cactus
  2. CACTUS-200

print error content if ...cactus.internal.client.connector.http.DefaultHttpClient.callGetResult gets response code other than 200

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      jdk1.5, cygwin, winxp

      Description

      The "test.tomcat.40" target of the latest struts distribution failed with not particularly useful insight why:
      << [junit] Running org.apache.struts.taglib.logic.TestEmptyTag
      [junit] Testsuite: org.apache.struts.taglib.logic.TestEmptyTag
      [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.873 sec
      [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.873 sec
      [junit] Testcase: testEmptyTagUsingName took 1.863 sec
      [junit] Caused an ERROR
      [junit] Failed to get the test results at http://localhost:8080/test/JspRedirector
      [junit] org.apache.cactus.util.ChainedRuntimeException: Failed to get the test results at [http://localhost:8080/tes
      t/JspRedirector]
      [junit] at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClie
      nt.java:92)
      [junit] at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultH
      ttpClient.java:306)
      [junit] at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
      [junit] at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.j
      ava:159)
      [junit] at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocol
      Handler.java:80)
      [junit] at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpP
      rotocolHandler.java:306)
      [junit] at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java
      )
      [junit] at org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
      [junit] at org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
      [junit] at org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
      [junit] org.apache.cactus.internal.client.ParsingException: Noot a valid response [500 Internal Server Error]
      [junit] at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callGetResult(DefaultHttpClient.ja
      va:215)
      [junit] at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClie
      nt.java:87)
      [junit] at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultH
      ttpClient.java:306)
      [junit] at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
      [junit] at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.j>>

        Activity

        Hide
        Ralf Hauser added a comment -

        The following patch then generated additional insight

        Show
        Ralf Hauser added a comment - The following patch then generated additional insight
        Hide
        Ralf Hauser added a comment -

        [junit] ------------- Standard Output ---------------
        [junit] there is a problem with the result:
        [junit] <html><head><title>Apache Tomcat/4.0.6 - Error report</title><STYLE><!--H1

        {font-family : sans-serif,Arial,Ta homa;color : white;background-color : #0086b2;}

        BODY

        {font-family : sans-serif,Arial,Tahoma;color : black;background-colo r : white;}

        B

        {color : white;background-color : #0086b2;}

        HR

        {color : #0086b2;}

        --></STYLE> </head><body><h1>Apache Tomcat
        /4.0.6 - HTTP Status 500 - Internal Server Error</h1><HR size="1" noshade><p><b>type</b> Exception report</p><p><b>messa
        ge</b> <u>Internal Server Error</u></p><p><b>description</b> <u>The server encountered an internal error (Internal Serve
        r Error) that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.apache.jasper.JasperExcepti
        on: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.

        [junit] An error occurred between lines: 1 and 28 in the jsp file: /jspRedirector.jsp

        [junit] Generated servlet error:
        [junit] C:\opt\Apache\jakarta-tomcat-4.0.6\work\Standalone\localhost\test\jspRedirector$jsp.java:72: Class org.apach
        e.jsp.JspImplicitObjects not found.
        [junit] JspImplicitObjects objects = new JspImplicitObjects();
        [junit] ^

        [junit] An error occurred between lines: 1 and 28 in the jsp file: /jspRedirector.jsp

        [junit] Generated servlet error:
        [junit] C:\opt\Apache\jakarta-tomcat-4.0.6\work\Standalone\localhost\test\jspRedirector$jsp.java:72: Class org.apach
        e.jsp.JspImplicitObjects not found.
        [junit] JspImplicitObjects objects = new JspImplicitObjects();
        [junit] ^
        [junit] 2 errors, 1 warning

        [junit] at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
        [junit] at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
        [junit] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
        [junit] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
        [junit] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
        [junit] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
        [junit] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        [junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
        [junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
        [junit] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
        [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        [junit] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        [junit] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        [junit] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
        [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        [junit] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
        [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        [junit] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        [junit] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        [junit] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
        [junit] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
        [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        [junit] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
        [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        [junit] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
        [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
        [junit] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        [junit] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        [junit] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
        [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
        [junit] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
        [junit] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
        [junit] at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
        [junit] at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
        [junit] at java.lang.Thread.run(Thread.java:595)
        [junit] </pre></p><HR size="1" noshade></body></html>
        [junit] ------------- ---------------- ---------------

        Show
        Ralf Hauser added a comment - [junit] ------------- Standard Output --------------- [junit] there is a problem with the result: [junit] <html><head><title>Apache Tomcat/4.0.6 - Error report</title><STYLE><!--H1 {font-family : sans-serif,Arial,Ta homa;color : white;background-color : #0086b2;} BODY {font-family : sans-serif,Arial,Tahoma;color : black;background-colo r : white;} B {color : white;background-color : #0086b2;} HR {color : #0086b2;} --></STYLE> </head><body><h1>Apache Tomcat /4.0.6 - HTTP Status 500 - Internal Server Error</h1><HR size="1" noshade><p><b>type</b> Exception report</p><p><b>messa ge</b> <u>Internal Server Error</u></p><p><b>description</b> <u>The server encountered an internal error (Internal Serve r Error) that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.apache.jasper.JasperExcepti on: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated. [junit] An error occurred between lines: 1 and 28 in the jsp file: /jspRedirector.jsp [junit] Generated servlet error: [junit] C:\opt\Apache\jakarta-tomcat-4.0.6\work\Standalone\localhost\test\jspRedirector$jsp.java:72: Class org.apach e.jsp.JspImplicitObjects not found. [junit] JspImplicitObjects objects = new JspImplicitObjects(); [junit] ^ [junit] An error occurred between lines: 1 and 28 in the jsp file: /jspRedirector.jsp [junit] Generated servlet error: [junit] C:\opt\Apache\jakarta-tomcat-4.0.6\work\Standalone\localhost\test\jspRedirector$jsp.java:72: Class org.apach e.jsp.JspImplicitObjects not found. [junit] JspImplicitObjects objects = new JspImplicitObjects(); [junit] ^ [junit] 2 errors, 1 warning [junit] at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285) [junit] at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) [junit] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176) [junit] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188) [junit] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) [junit] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) [junit] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) [junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) [junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) [junit] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) [junit] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) [junit] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) [junit] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190) [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) [junit] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) [junit] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) [junit] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) [junit] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) [junit] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) [junit] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) [junit] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) [junit] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) [junit] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) [junit] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) [junit] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) [junit] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) [junit] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) [junit] at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027) [junit] at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125) [junit] at java.lang.Thread.run(Thread.java:595) [junit] </pre></p><HR size="1" noshade></body></html> [junit] ------------- ---------------- ---------------
        Hide
        Ralf Hauser added a comment -

        I unpacked the test.war file the struts testcase creates and there is a cactus-1.*.jar inside and inside this jar is a org/apache/cactus/internal/server/JspImplicitObjects.class

        also, I saw that the framework/web/jspRedirector.jsp contains
        <%@page import="org.apache.cactus.server.,org.apache.cactus.internal.server." session="true" %><% ...
        so I don't know why this fails?

        Show
        Ralf Hauser added a comment - I unpacked the test.war file the struts testcase creates and there is a cactus-1.*.jar inside and inside this jar is a org/apache/cactus/internal/server/JspImplicitObjects.class also, I saw that the framework/web/jspRedirector.jsp contains <%@page import="org.apache.cactus.server. ,org.apache.cactus.internal.server. " session="true" %><% ... so I don't know why this fails?

          People

          • Assignee:
            Unassigned
            Reporter:
            Ralf Hauser
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development