You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Paulo R C Siqueira <ga...@yahoo.com.br> on 2006/02/20 20:58:25 UTC

problem getting test results

Hi,

I'm having problems getting the Cactus test results. When I run my tests I always get this exception:

15:53:51,882 ERROR [AbstractWebTestCaller] Error getting test result. This could happen for example if you're using a load-balancer. Please disable it before running Cactus tests.
15:53:51,883 ERROR [[ServletRedirectorSecure]] Servlet.service() for servlet ServletRedirectorSecure threw exception
javax.servlet.ServletException: Error getting test result. This could happen for example if you're using a load-balancer. Please disable it before running Cactus tests.
        at org.apache.cactus.internal.server.AbstractWebTestCaller.doGetResults(AbstractWebTestCaller.java:176)
        at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:98)
        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:697)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)


I'm running the tests under JBoss 4.0.3
What am I doing wrong here?


_________________________________
Paulo "gangrel-br" R C Siqueira
Sun Certified Programmer for the Java 2 Platform 1.4
Mogi das Cruzes - SP - Brazil
Contact: (11) 8149-5046
		
---------------------------------
 Yahoo! Acesso Grátis 
Internet rápida e grátis. Instale o discador agora!

Re: problem getting test results

Posted by Paulo R C Siqueira <ga...@yahoo.com.br>.
Hi,

Getting back to this problem, I've been trying some things here and just found out that if I comment the "theRequest.setURL" call, the test works. But in this case, I can't specify the  page that I want to test... 

Also, I found this error message that can be somewhat related to the problem, but I'm sure really sure of it...

Apr 3, 2006 5:03:44 PM org.apache.commons.httpclient.HttpMethodBase processRedirectResponse
INFO: Redirect requested but followRedirects is disabled

Am I missing something here?

Thanks!

Paulo R C Siqueira <ga...@yahoo.com.br> escreveu: The source is the same for the ServletRedirector and for the ServletRedirectorSecure, except that for the ServletRedirectorSecure I uncomment the two commentted lines in the beginHome mehod.

public class Test extends ServletTestCase {
  public Test( String name ) {
    super( name );
  }
  public void beginHome( WebRequest theRequest ) {
    theRequest.setURL( "localhost", "/teste","/Home.do", null, null );
// theRequest.setRedirectorName( "ServletRedirectorSecure" );
// theRequest.setAuthentication(new FormAuthentication("test","123"));
  }
  public void testHome() {
    assertTrue( "Forcing assertion failure", false );
  }
}

The web.xml too is the same for both the ServletRedirector and the ServletRedirectorSecure, except that I remove the lines for declarative security when using the ServletRedirector:



        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                            http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  
    action
    org.apache.struts.action.ActionServlet
    
      
config

      
/WEB-INF/struts-config.xml

    
     
      
debug

      
2

    
    
      
detail

      
2

    
    2
  
  
    action
    *.do
  
  
  
   
     Unprotected Resources
     /Logout.do
     /images/*
  
    
    
      
        All Pages
        /*
    
    
      test
    
  

    FORM
    
        /Login.do
        /LoginError.do
    
  
  
    test
  


There is nothing specific to Cactus in the deployment descriptor. I use the following Ant target to add the Cactus configuration to the web.xml file:


  
    
    
    
        mapping="/ServletRedirectorSecure"/>
  
  
  


Thank You :)

Kazuhito SUGURI  escreveu: Hi Paulo,

In article <20...@web52104.mail.yahoo.com>,
Fri, 3 Mar 2006 11:08:46 -0300 (ART),
Paulo R C Siqueira  wrote: 
gangrelbr1> It is frustrating... but with ServletRedirector instead of
gangrelbr1> ServletRedirectorSecure it works.
gangrelbr1> This means I will need to run my tests with testing authentication?
gangrelbr1> Or is there something that could be done to solve this problem?

I'm not understanding why authentication makes the problem.
Could you please post following items for further analysis?
- source codes of the test case and web.xml that are using ServletRedirectorSecure
- source codes of the test case and web.xml that are using ServletRedirector

Regards,
----
Kazuhito SUGURI

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org




_________________________________
Paulo "gangrel-br" R C Siqueira
Sun Certified Programmer for the Java 2 Platform 1.4
Mogi das Cruzes - SP - Brazil
Contact: (11) 8149-5046
  
---------------------------------
 Yahoo! Search
 Dê uma espiadinha e saiba tudo sobre o Big Brother Brasil.


_________________________________
Paulo "gangrel-br" R C Siqueira
Sun Certified Programmer for the Java 2 Platform 1.4
Mogi das Cruzes - SP - Brazil
Contact: (11) 8149-5046
		
---------------------------------
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora!

Re: problem getting test results

Posted by Paulo R C Siqueira <ga...@yahoo.com.br>.
The source is the same for the ServletRedirector and for the ServletRedirectorSecure, except that for the ServletRedirectorSecure I uncomment the two commentted lines in the beginHome mehod.

public class Test extends ServletTestCase {
  public Test( String name ) {
    super( name );
  }
  public void beginHome( WebRequest theRequest ) {
    theRequest.setURL( "localhost", "/teste","/Home.do", null, null );
// theRequest.setRedirectorName( "ServletRedirectorSecure" );
// theRequest.setAuthentication(new FormAuthentication("test","123"));
  }
  public void testHome() {
    assertTrue( "Forcing assertion failure", false );
  }
}

The web.xml too is the same for both the ServletRedirector and the ServletRedirectorSecure, except that I remove the lines for declarative security when using the ServletRedirector:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                            http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
     <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
  <!-- Declarative security configuration -->
  <security-constraint>
   <web-resource-collection>
     <web-resource-name>Unprotected Resources</web-resource-name>
     <url-pattern>/Logout.do</url-pattern>
     <url-pattern>/images/*</url-pattern>
  </web-resource-collection>
    </security-constraint>
    <security-constraint>
      <web-resource-collection>
        <web-resource-name>All Pages</web-resource-name>
        <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>test</role-name>
    </auth-constraint>
  </security-constraint>
<login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
        <form-login-page>/Login.do</form-login-page>
        <form-error-page>/LoginError.do</form-error-page>
    </form-login-config>
  </login-config>
  <security-role>
    <role-name>test</role-name>
  </security-role>
</web-app>

There is nothing specific to Cactus in the deployment descriptor. I use the following Ant target to add the Cactus configuration to the web.xml file:

<target name="cactus">
  <cactifywar srcfile="${dist.war}" destfile="${dist.dir}/test${war.name}">
    <classes dir="${build.test.classes.dir}" includes="**/*.class"/>
    <servletredirector/>
    <servletredirector name="ServletRedirectorSecure"
        mapping="/ServletRedirectorSecure"/>
  </cactifywar>
  <!-- Replace the base app jar with the test version. -->
  <move file="${dist.dir}/test${war.name}" tofile="${dist.war}"/>
</target>

Thank You :)

Kazuhito SUGURI <su...@lab.ntt.co.jp> escreveu: Hi Paulo,

In article <20...@web52104.mail.yahoo.com>,
Fri, 3 Mar 2006 11:08:46 -0300 (ART),
Paulo R C Siqueira  wrote: 
gangrelbr1> It is frustrating... but with ServletRedirector instead of
gangrelbr1> ServletRedirectorSecure it works.
gangrelbr1> This means I will need to run my tests with testing authentication?
gangrelbr1> Or is there something that could be done to solve this problem?

I'm not understanding why authentication makes the problem.
Could you please post following items for further analysis?
- source codes of the test case and web.xml that are using ServletRedirectorSecure
- source codes of the test case and web.xml that are using ServletRedirector

Regards,
----
Kazuhito SUGURI

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org




_________________________________
Paulo "gangrel-br" R C Siqueira
Sun Certified Programmer for the Java 2 Platform 1.4
Mogi das Cruzes - SP - Brazil
Contact: (11) 8149-5046
		
---------------------------------
 Yahoo! Search
 Dê uma espiadinha e saiba tudo sobre o Big Brother Brasil.

Re: problem getting test results

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Paulo,

In article <20...@web52104.mail.yahoo.com>,
Fri, 3 Mar 2006 11:08:46 -0300 (ART),
Paulo R C Siqueira <ga...@yahoo.com.br> wrote: 
gangrelbr1> It is frustrating... but with ServletRedirector instead of
gangrelbr1> ServletRedirectorSecure it works.
gangrelbr1> This means I will need to run my tests with testing authentication?
gangrelbr1> Or is there something that could be done to solve this problem?

I'm not understanding why authentication makes the problem.
Could you please post following items for further analysis?
- source codes of the test case and web.xml that are using ServletRedirectorSecure
- source codes of the test case and web.xml that are using ServletRedirector

Regards,
----
Kazuhito SUGURI

Re: problem getting test results

Posted by Paulo R C Siqueira <ga...@yahoo.com.br>.
Hi,

It is frustrating... but with ServletRedirector instead of ServletRedirectorSecure it works... This means I will need to run my tests with testing authentication? Or is there something that could be done to solve this problem?

thanks!!

Kazuhito SUGURI <su...@lab.ntt.co.jp> escreveu: Hi Paulo,

In article <20...@web52114.mail.yahoo.com>,
Wed, 1 Mar 2006 14:47:18 +0000 (GMT),
Paulo R C Siqueira  wrote: 
gangrelbr1> I tried to run the test with junit.textui.TestRunner.
[snip]
gangrelbr1> This is the error on the client side:
gangrelbr1> 
gangrelbr1> org.apache.cactus.util.ChainedRuntimeException: Failed to get the test results at [http://127.0.0.1:8080/myapp/ServletRedirectorSecure]

Could you try ServletRedirector instead of ServletRedirectorSecure?
I'm not sure that the authentication could be a cause, though.

Regards,
----
Kazuhito SUGURI

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org




_________________________________
Paulo "gangrel-br" R C Siqueira
Sun Certified Programmer for the Java 2 Platform 1.4
Mogi das Cruzes - SP - Brazil
Contact: (11) 8149-5046
		
---------------------------------
 Yahoo! Acesso Grátis 
Internet rápida e grátis. Instale o discador agora!

Re: problem getting test results

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Paulo,

In article <20...@web52114.mail.yahoo.com>,
Wed, 1 Mar 2006 14:47:18 +0000 (GMT),
Paulo R C Siqueira <ga...@yahoo.com.br> wrote: 
gangrelbr1> I tried to run the test with junit.textui.TestRunner.
[snip]
gangrelbr1> This is the error on the client side:
gangrelbr1> 
gangrelbr1> org.apache.cactus.util.ChainedRuntimeException: Failed to get the test results at [http://127.0.0.1:8080/myapp/ServletRedirectorSecure]

Could you try ServletRedirector instead of ServletRedirectorSecure?
I'm not sure that the authentication could be a cause, though.

Regards,
----
Kazuhito SUGURI

Re: Is Cactus thread safe?

Posted by Shay Thompson <st...@adobe.com>.
1. This shouldn't be a problem since I'm using Ant to run Cactus and 
with Ant I can thread the call.

2. This part I have working with my own stuff and would be taken care of 
on all remote machines before running the multi-threaded cactus calls.

Thanks for the advice,
Shay

Kazuhito SUGURI wrote:
> Hi Shay,
>
> In article <44...@adobe.com>,
> Tue, 28 Feb 2006 17:22:22 -0600,
> Shay Thompson <st...@adobe.com> wrote: 
> sthompso> I need to test multiple remote machines, from a single main machine, 
> sthompso> using Cactus.  I'm wondering if Cactus is thread safe for doing 
> sthompso> something like this?  I'd obviously have to have it run off of separate 
> sthompso> ear files, 1 for each remote machine, but even then will it work?
>
> I think it's possible.
>
> Some possible constraints for the use-case I can imagine:
> 1. exclusive JVM is required for each cactified application under test
>    since client-side of Cactus set the contextURL as a System property.
>    So, you have to invoke multiple JVM processes each of which runs Cactus
>    for one remote machine, if you need to test remote machines simultaneously.
> 2. Cactus does not have a capability of remote deployment, yet.
>    So, you have to deploy cactified applications to remote machines
>    before you run tests.
>
> Hope this helps,
> ----
> Kazuhito SUGURI
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>   

-- 

... hey, it works on my machine.

Shay Thompson - Lead Computer Scientist
Adobe Systems, Inc. - Titan Core QE 
Voice: x34728 or 612.251.5415


Re: Is Cactus thread safe?

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Shay,

In article <44...@adobe.com>,
Tue, 28 Feb 2006 17:22:22 -0600,
Shay Thompson <st...@adobe.com> wrote: 
sthompso> I need to test multiple remote machines, from a single main machine, 
sthompso> using Cactus.  I'm wondering if Cactus is thread safe for doing 
sthompso> something like this?  I'd obviously have to have it run off of separate 
sthompso> ear files, 1 for each remote machine, but even then will it work?

I think it's possible.

Some possible constraints for the use-case I can imagine:
1. exclusive JVM is required for each cactified application under test
   since client-side of Cactus set the contextURL as a System property.
   So, you have to invoke multiple JVM processes each of which runs Cactus
   for one remote machine, if you need to test remote machines simultaneously.
2. Cactus does not have a capability of remote deployment, yet.
   So, you have to deploy cactified applications to remote machines
   before you run tests.

Hope this helps,
----
Kazuhito SUGURI

Is Cactus thread safe?

Posted by Shay Thompson <st...@adobe.com>.
I need to test multiple remote machines, from a single main machine, 
using Cactus.  I'm wondering if Cactus is thread safe for doing 
something like this?  I'd obviously have to have it run off of separate 
ear files, 1 for each remote machine, but even then will it work?

Any recommendations would be helpfull.

-Shay

Re: problem getting test results

Posted by Paulo R C Siqueira <ga...@yahoo.com.br>.
Hi, 

This is the exception at the server side:

14:08:40,918 ERROR [AbstractWebTestCaller] Error getting test result. This could happen for example if you're using a load-balancer. Please disable it before running Cactus tests.
14:08:40,919 ERROR [[ServletRedirectorSecure]] Servlet.service() for servlet ServletRedirectorSecure threw exception
javax.servlet.ServletException: Error getting test result. This could happen for example if you're using a load-balancer. Please disable it before running Cactus tests.
        at org.apache.cactus.internal.server.AbstractWebTestCaller.doGetResults(AbstractWebTestCaller.java:176)
        at org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:98)
        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:697)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)

thanks :)

Kenney Westerhof <fo...@neonics.com> escreveu: On Wed, 1 Mar 2006, Paulo R C Siqueira wrote:


Do you have the log for the server side? The internal server error
there should give you more information about what went wrong on the server
(a NullPointerException usually gives a status 500...)

-- Kenney

> Hi Kazuhito,
>
> Thanks again for the answer! :)
>
> I tried to run the test with junit.textui.TestRunner. The result was exactly the same... That exception was raised on the server side and an "Internal Server Error" on the client side.
>
> This is the error on the client side:
>
> org.apache.cactus.util.ChainedRuntimeException: Failed to get the test results at [http://127.0.0.1:8080/myapp/ServletRedirectorSecure]
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:92)
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
>         at org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
>         at org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
>         at org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
> org.apache.cactus.internal.client.ParsingException: Not a valid response [500 Internal Server Error]
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callGetResult(DefaultHttpClient.java:211)
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:87)
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
>         at org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
>         at org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
>         at org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
>
> My Environment:
>  Linux kernel 2.4.26
>  Sun jdk 1.5.0_05_b5
>  JBoss-4.0.3
>  Cactus-1.7.1
>
> Any more ideas? :S
>
> Thanks again!
>
>  You might try run test without NetBeans to know whether Cactus works
> with your target container (JBoss-4.0.3).
> I had tried following steps last weekend and it worked fine:
> (1) create cactified-war with a simple test
> (2) start JBoss
> (3) deploy the cactified-war file to JBoss manually
> (4) run test by using junit.textui.TestRunner:
>  java junit.textui.TestRunner
>
> My environment is as follows:
>  Linux kernel 2.6.8
>  Sun jdk 1.5.0_06
>  JBoss-4.0.3SP1
>  Cactus-1.7.1
>
> Once you found a working configuration, you can use that for other tests,
> and can narrow the problem you have encountered.
>
> Regards,
> ----
> Kazuhito SUGURI
>
>
>
> _________________________________
> Paulo "gangrel-br" R C Siqueira
> Sun Certified Programmer for the Java 2 Platform 1.4
> Mogi das Cruzes - SP - Brazil
> Contact: (11) 8149-5046
>
> ---------------------------------
>  Yahoo! Search
>  Dê uma espiadinha e saiba tudo sobre o Big Brother Brasil.

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org




_________________________________
Paulo "gangrel-br" R C Siqueira
Sun Certified Programmer for the Java 2 Platform 1.4
Mogi das Cruzes - SP - Brazil
Contact: (11) 8149-5046
		
---------------------------------
 Yahoo! Acesso Grátis 
Internet rápida e grátis. Instale o discador agora!

Re: problem getting test results

Posted by Kenney Westerhof <fo...@neonics.com>.
On Wed, 1 Mar 2006, Paulo R C Siqueira wrote:


Do you have the log for the server side? The internal server error
there should give you more information about what went wrong on the server
(a NullPointerException usually gives a status 500...)

-- Kenney

> Hi Kazuhito,
>
> Thanks again for the answer! :)
>
> I tried to run the test with junit.textui.TestRunner. The result was exactly the same... That exception was raised on the server side and an "Internal Server Error" on the client side.
>
> This is the error on the client side:
>
> org.apache.cactus.util.ChainedRuntimeException: Failed to get the test results at [http://127.0.0.1:8080/myapp/ServletRedirectorSecure]
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:92)
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
>         at org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
>         at org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
>         at org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
> org.apache.cactus.internal.client.ParsingException: Not a valid response [500 Internal Server Error]
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callGetResult(DefaultHttpClient.java:211)
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:87)
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
>         at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
>         at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
>         at org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
>         at org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
>         at org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
>
> My Environment:
>  Linux kernel 2.4.26
>  Sun jdk 1.5.0_05_b5
>  JBoss-4.0.3
>  Cactus-1.7.1
>
> Any more ideas? :S
>
> Thanks again!
>
>  You might try run test without NetBeans to know whether Cactus works
> with your target container (JBoss-4.0.3).
> I had tried following steps last weekend and it worked fine:
> (1) create cactified-war with a simple test
> (2) start JBoss
> (3) deploy the cactified-war file to JBoss manually
> (4) run test by using junit.textui.TestRunner:
>  java junit.textui.TestRunner
>
> My environment is as follows:
>  Linux kernel 2.6.8
>  Sun jdk 1.5.0_06
>  JBoss-4.0.3SP1
>  Cactus-1.7.1
>
> Once you found a working configuration, you can use that for other tests,
> and can narrow the problem you have encountered.
>
> Regards,
> ----
> Kazuhito SUGURI
>
>
>
> _________________________________
> Paulo "gangrel-br" R C Siqueira
> Sun Certified Programmer for the Java 2 Platform 1.4
> Mogi das Cruzes - SP - Brazil
> Contact: (11) 8149-5046
>
> ---------------------------------
>  Yahoo! Search
>  D� uma espiadinha e saiba tudo sobre o Big Brother Brasil.

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

Re: problem getting test results

Posted by Paulo R C Siqueira <ga...@yahoo.com.br>.
Hi Kazuhito,

Thanks again for the answer! :)

I tried to run the test with junit.textui.TestRunner. The result was exactly the same... That exception was raised on the server side and an "Internal Server Error" on the client side.

This is the error on the client side:

org.apache.cactus.util.ChainedRuntimeException: Failed to get the test results at [http://127.0.0.1:8080/myapp/ServletRedirectorSecure]
        at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:92)
        at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
        at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
        at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
        at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
        at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
        at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
        at org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
        at org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
        at org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
org.apache.cactus.internal.client.ParsingException: Not a valid response [500 Internal Server Error]
        at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callGetResult(DefaultHttpClient.java:211)
        at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:87)
        at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
        at org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
        at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
        at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
        at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
        at org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
        at org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
        at org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
        at org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)

My Environment:
 Linux kernel 2.4.26
 Sun jdk 1.5.0_05_b5
 JBoss-4.0.3
 Cactus-1.7.1

Any more ideas? :S

Thanks again!

 You might try run test without NetBeans to know whether Cactus works
with your target container (JBoss-4.0.3).
I had tried following steps last weekend and it worked fine:
(1) create cactified-war with a simple test
(2) start JBoss
(3) deploy the cactified-war file to JBoss manually
(4) run test by using junit.textui.TestRunner:
 java junit.textui.TestRunner 

My environment is as follows:
 Linux kernel 2.6.8
 Sun jdk 1.5.0_06
 JBoss-4.0.3SP1
 Cactus-1.7.1

Once you found a working configuration, you can use that for other tests,
and can narrow the problem you have encountered.

Regards,
----
Kazuhito SUGURI



_________________________________
Paulo "gangrel-br" R C Siqueira
Sun Certified Programmer for the Java 2 Platform 1.4
Mogi das Cruzes - SP - Brazil
Contact: (11) 8149-5046
		
---------------------------------
 Yahoo! Search
 Dê uma espiadinha e saiba tudo sobre o Big Brother Brasil.

Re: problem getting test results

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Paulo,

In article <20...@web52114.mail.yahoo.com>,
Fri, 24 Feb 2006 12:34:00 +0000 (GMT),
Paulo R C Siqueira <ga...@yahoo.com.br> wrote: 
gangrelbr1> Since I don't know how exactly NetBeans handle the tests
gangrelbr1> internally, and I'm using the default configurations for JBoss,
gangrelbr1> it seens more likely that (2) is what is happening.
gangrelbr1> What should I do?

You might try run test without NetBeans to know whether Cactus works
with your target container (JBoss-4.0.3).
I had tried following steps last weekend and it worked fine:
(1) create cactified-war with a simple test
(2) start JBoss
(3) deploy the cactified-war file to JBoss manually
(4) run test by using junit.textui.TestRunner:
	java junit.textui.TestRunner <test class name>

My environment is as follows:
	Linux kernel 2.6.8
	Sun jdk 1.5.0_06
	JBoss-4.0.3SP1
	Cactus-1.7.1

Once you found a working configuration, you can use that for other tests,
and can narrow the problem you have encountered.

Regards,
----
Kazuhito SUGURI

Re: problem getting test results

Posted by Paulo R C Siqueira <ga...@yahoo.com.br>.
Hi Kazuhito,

I'm using NetBeans 5.0 to run the tests. I have a simple test extending ServletTestCase with a simple test method that only calls 'assertTrue', just to be sure when the tests are running correctly.

Since I don't know how exactly NetBeans handle the tests internally, and I'm using the default configurations for JBoss, it seens more likely that (2) is what is happening. What should I do?

Thank you very much for the help! =)

Kazuhito SUGURI <su...@lab.ntt.co.jp> escreveu: Hi Paulo,

In article <20...@web52103.mail.yahoo.com>,
Mon, 20 Feb 2006 16:58:25 -0300 (ART),
Paulo R C Siqueira  wrote: 
gangrelbr1> I'm having problems getting the Cactus test results. When I run my tests I always get this exception:
gangrelbr1> 
gangrelbr1> 15:53:51,882 ERROR [AbstractWebTestCaller] Error getting test result. This could happen for example if you're using a load-balancer. Please disable it before running Cactus tests.

How are you runnning the test?
By using ServletTestRunner, for example?


The client side of Cactus sends requests to server side twice
for each testXXX() method. The first request is to execute the test.
The test result will be saved as a context scope attribute.
The second request is to retrieve test result from the context scope.

The error you have encountered happens on the second request and
it can happen if the context scope attribute for the test result
does not exist. Possible causes are
(1) the server-side context receiving the second request from the client-side
    is not the one that received the first request.
(2) the client-side is making the second request before the first request
    fully finished.

So, we must see test execution sequence including the client-side
to know what is really happening in your case.

Regards,
----
Kazuhito SUGURI

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org




_________________________________
Paulo "gangrel-br" R C Siqueira
Sun Certified Programmer for the Java 2 Platform 1.4
Mogi das Cruzes - SP - Brazil
Contact: (11) 8149-5046
		
---------------------------------
 Yahoo! Acesso Grátis 
Internet rápida e grátis. Instale o discador agora!

Re: problem getting test results

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Paulo,

In article <20...@web52103.mail.yahoo.com>,
Mon, 20 Feb 2006 16:58:25 -0300 (ART),
Paulo R C Siqueira <ga...@yahoo.com.br> wrote: 
gangrelbr1> I'm having problems getting the Cactus test results. When I run my tests I always get this exception:
gangrelbr1> 
gangrelbr1> 15:53:51,882 ERROR [AbstractWebTestCaller] Error getting test result. This could happen for example if you're using a load-balancer. Please disable it before running Cactus tests.

How are you runnning the test?
By using ServletTestRunner, for example?


The client side of Cactus sends requests to server side twice
for each testXXX() method. The first request is to execute the test.
The test result will be saved as a context scope attribute.
The second request is to retrieve test result from the context scope.

The error you have encountered happens on the second request and
it can happen if the context scope attribute for the test result
does not exist. Possible causes are
(1) the server-side context receiving the second request from the client-side
    is not the one that received the first request.
(2) the client-side is making the second request before the first request
    fully finished.

So, we must see test execution sequence including the client-side
to know what is really happening in your case.

Regards,
----
Kazuhito SUGURI