Meet the ChainedRuntimeException: Failed to get the test results when test filter integrating with jetty

2010-08-15 Thread Haiting Zhang
hi all,

I meet a strange problem when i writing a test for a simple filter, the
filter's function is to save the user name in the session. The test works
well when I deploy it in tomcat and test it from browser. But when I try to
integrate it with jetty and run the test using junit4 in the eclipse, it
give me the strange error information. I have worked this strange error for
several days, and hope get some help from you. Thanks very much.

btw, I also write a simple servlet test, and it also works well with the
jetty integration, they are in the same project.

the following is the exception, classes and configuration.

0. the exception detail

org.apache.cactus.util.ChainedRuntimeException: Failed to get the test
results at [http://localhost:8081/CactusTest/FilterRedirector]
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:93)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:307)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java:1)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:164)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:83)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:307)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java:1)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:145)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:218)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at
org.apache.cactus.extension.jetty.Jetty5xTestSetup$1.protect(Jetty5xTestSetup.java:168)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at
org.apache.cactus.extension.jetty.Jetty5xTestSetup.run(Jetty5xTestSetup.java:176)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
org.apache.cactus.internal.client.ParsingException: Not a valid response
[404 %2FCactusTest%2FFilterRedirector+Not+Found]
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callGetResult(DefaultHttpClient.java:212)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:88)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:307)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java:1)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:164)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:83)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:307)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java:1)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:145)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:218)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at 

Re: ChainedRuntimeException

2007-09-06 Thread Kazuhito SUGURI
Hi,

In article [EMAIL PROTECTED],
Thu, 6 Sep 2007 11:22:59 +0530,
Indranil Poddar [EMAIL PROTECTED] wrote: 
indranil I am using Websphere Studio Application developer to run Unit tests 
for my 
indranil web application.
indranil I have incorporated Cactus to do the server side testing.
indranil However, when I run the tests, I get a ChainedRuntimeException. The 
indranil detailed log is given below:
indranil 
indranil.poddar org.apache.cactus.util.ChainedRuntimeException: Failed to get 
the test 
indranil results at 
indranil [http://localhost:9080/CspLoanAdmin/JSP/Admin/ServletRedirector]
[snip]
indranil org.apache.cactus.client.ParsingException: Not a valid response [404 
Not 
indranil Found]

Make sure you have deployed the Cactified application to the server
so that the URL of the ServletReditector,
http://localhost:9080/CspLoanAdmin/JSP/Admin/ServletRedirector
is available.

Hope this helps,

Kazuhito SUGURI

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ChainedRuntimeException

2007-09-06 Thread Indranil Poddar
Thank you Kazuhito for your speedy response.
I have taken the following steps to cactify my web app in Websphere 
Studio:
Added jars to Java Build path: 
cactus-1.5.jar,
aspectjrt-1.1.1.jar
commons-httpclient-2.0-rc2.jar.
Added the following mappings to my web.xml:
servlet-nameServletRedirector/servlet-name
servlet-class
org.apache.cactus.server.ServletTestRedirector/servlet-class
/servlet
servlet
servlet-nameServletTestRunner/servlet-name
servlet-class
org.apache.cactus.server.runner.ServletTestRunner/servlet-class
/servlet


servlet-mapping
servlet-nameServletRedirector/servlet-name
url-pattern/ServletRedirector/url-pattern
/servlet-mapping
servlet-mapping
servlet-nameServletTestRunner/servlet-name
url-pattern/ServletTestRunner/url-pattern
/servlet-mapping

Is this sufficient?. Do I need to go through any additional steps?
Your suggestions would be very helpful.

Thanks,
Indranil Poddar
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Experience certainty. IT Services
   Business Solutions
   Outsourcing

=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




Re: ChainedRuntimeException

2007-09-06 Thread Kazuhito SUGURI
Hi,

In article [EMAIL PROTECTED],
Thu, 6 Sep 2007 12:50:15 +0530,
Indranil Poddar [EMAIL PROTECTED] wrote: 
indranil Added jars to Java Build path: 
indranil cactus-1.5.jar,
indranil aspectjrt-1.1.1.jar
indranil commons-httpclient-2.0-rc2.jar.

Do you mean WEB-INF/lib of the application contains these jars?
If so, you may also need to add commons-logging and junit jars.
It's depending on the class-path of the application in the server.


indranil Added the following mappings to my web.xml:
indranil servlet-nameServletRedirector/servlet-name
indranil servlet-class
indranil org.apache.cactus.server.ServletTestRedirector/servlet-class
indranil /servlet
indranil servlet
indranil servlet-nameServletTestRunner/servlet-name
indranil servlet-class
indranil org.apache.cactus.server.runner.ServletTestRunner/servlet-class
indranil /servlet
indranil 
indranil 
indranil servlet-mapping
indranil servlet-nameServletRedirector/servlet-name
indranil url-pattern/ServletRedirector/url-pattern
indranil /servlet-mapping
indranil servlet-mapping
indranil servlet-nameServletTestRunner/servlet-name
indranil url-pattern/ServletTestRunner/url-pattern
indranil /servlet-mapping

It looks good.
Next point to be confirmed is the consistency between
the context-root of the application and cactus.contextURL property.

According to the stack-trace in your previous message,
the cactus.contextURL would be http://localhost:9080/CspLoanAdmin/JSP/Admin.
If the application had been deployed as CspLoadAdmin, however,
the cactus.contextURL should be http://localhost:9080/CspLoanAdmin.


BTW, I'm assuming the application had been deployed successfully,
because the server returned 404 instead of 5xx.
Since I have never used WebSphere, it might be a wrong assumption. 
I recommend you to check the fact first :-)

Hope this helps,

Kazuhito SUGURI

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ChainedRuntimeException

2007-09-06 Thread Indranil Poddar
Thank you very much!
I changed the cactus.ContextURL  to http://localhost:9080/CspLoanAdmin and 
everything is working fine.
Your suggestions have been very helpful indeed.
Cheers,
Indranil Poddar 





Kazuhito SUGURI [EMAIL PROTECTED] 
09/06/2007 04:55 PM
Please respond to
Cactus Users List cactus-user@jakarta.apache.org


To
cactus-user@jakarta.apache.org
cc

Subject
Re: ChainedRuntimeException






Hi,

In article 
[EMAIL PROTECTED],
Thu, 6 Sep 2007 12:50:15 +0530,
Indranil Poddar [EMAIL PROTECTED] wrote: 
indranil Added jars to Java Build path: 
indranil cactus-1.5.jar,
indranil aspectjrt-1.1.1.jar
indranil commons-httpclient-2.0-rc2.jar.

Do you mean WEB-INF/lib of the application contains these jars?
If so, you may also need to add commons-logging and junit jars.
It's depending on the class-path of the application in the server.


indranil Added the following mappings to my web.xml:
indranil servlet-nameServletRedirector/servlet-name
indranil servlet-class
indranil org.apache.cactus.server.ServletTestRedirector/servlet-class
indranil /servlet
indranil servlet
indranil servlet-nameServletTestRunner/servlet-name
indranil servlet-class
indranil 
org.apache.cactus.server.runner.ServletTestRunner/servlet-class
indranil /servlet
indranil 
indranil 
indranil servlet-mapping
indranil servlet-nameServletRedirector/servlet-name
indranil url-pattern/ServletRedirector/url-pattern
indranil /servlet-mapping
indranil servlet-mapping
indranil servlet-nameServletTestRunner/servlet-name
indranil url-pattern/ServletTestRunner/url-pattern
indranil /servlet-mapping

It looks good.
Next point to be confirmed is the consistency between
the context-root of the application and cactus.contextURL property.

According to the stack-trace in your previous message,
the cactus.contextURL would be 
http://localhost:9080/CspLoanAdmin/JSP/Admin.
If the application had been deployed as CspLoadAdmin, however,
the cactus.contextURL should be http://localhost:9080/CspLoanAdmin.


BTW, I'm assuming the application had been deployed successfully,
because the server returned 404 instead of 5xx.
Since I have never used WebSphere, it might be a wrong assumption. 
I recommend you to check the fact first :-)

Hope this helps,

Kazuhito SUGURI

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

ForwardSourceID:NT0BE6 
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




ChainedRuntimeException

2007-09-05 Thread Indranil Poddar
Hi,
I am using Websphere Studio Application developer to run Unit tests for my 
web application.
I have incorporated Cactus to do the server side testing.
However, when I run the tests, I get a ChainedRuntimeException. The 
detailed log is given below:

org.apache.cactus.util.ChainedRuntimeException: Failed to get the test 
results at 
[http://localhost:9080/CspLoanAdmin/JSP/Admin/ServletRedirector]
at 
org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:131)
at 
org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:222)
at 
org.apache.cactus.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
at 
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runWebTest(WebClientTestCaseDelegate.java:333)
at 
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runGenericTest(WebClientTestCaseDelegate.java:281)
at 
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runTest(WebClientTestCaseDelegate.java:257)
at 
org.apache.cactus.ServletTestCase.runCactusTest(ServletTestCase.java:300)
at 
org.apache.cactus.ServletTestCase.runBare(ServletTestCase.java:263)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)
org.apache.cactus.client.ParsingException: Not a valid response [404 Not 
Found]
at 
org.apache.cactus.client.connector.http.DefaultHttpClient.callGetResult(DefaultHttpClient.java:249)
at 
org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:126)
at 
org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:222)
at 
org.apache.cactus.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
at 
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runWebTest(WebClientTestCaseDelegate.java:333)
at 
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runGenericTest(WebClientTestCaseDelegate.java:281)
at 
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runTest(WebClientTestCaseDelegate.java:257)
at 
org.apache.cactus.ServletTestCase.runCactusTest(ServletTestCase.java:300)
at 
org.apache.cactus.ServletTestCase.runBare(ServletTestCase.java:263)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)

Any help would be appreciated.
Thanks in advance,

Indranil Poddar
ForwardSourceID:NT0B9E 
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




Re: ChainedRuntimeException

2007-05-09 Thread Min Edwards
Check your cactus.properties file and make sure you have the servlet redirect 
to matches this:  http://localhost:8080/javaWebAppSec/ServletRedirector

If that is not the issue, make sure you have the ear file deployed correctly in 
your application server. 
I saw this problem once because the cactus test was running against the wrong 
ear file deployed.




Cody, John T [EMAIL PROTECTED] wrote: I'm getting a ChainedRuntimeException 
when I try to run my tests.  My application uses forms based authentication, 
and I know that the authentication piece is working and the error message says 
that it can't connect to the secured redirector.  Below is all the code that I 
can think of that might be relevant.  Any help you can provide would be great.

Thanks
john

Below is my ServletTestCase

package controller;
import java.util.ArrayList;

import org.apache.cactus.ServletTestCase;
import org.apache.cactus.WebRequest;
import org.apache.cactus.client.authentication.FormAuthentication;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

public class SesServletTestStuActions extends ServletTestCase {
 private int testCtr = 0;
 private static ArrayList actions = new ArrayList();

 public void begin(WebRequest request) throws Exception {
  actions.add(index);
  actions.add(listClasses);
  actions.add(courseDetail);
  actions.add(listCourses);
  actions.add(logout);
  
  // This is the only action a student can't do.
  actions.add(listEntities);
  
//  We only need to authenticate the user once, for each ServletTestCase
  request.setAuthentication(new FormAuthentication([EMAIL PROTECTED]  , 
testStu)); 
  request.addParameter(action, actions.get(testCtr));

 }

 public void end(WebRequest request) throws Exception {
  actions = null;
  testCtr++;
 }
 
 // Testing actions that a student can do
 @Test
 public void testUserHasPermission1() throws Exception {
  SesServlet sesServlet = new SesServlet();
  assertTrue(The user can NOT perform this action, 
sesServlet.userHasPermission(request));
  
 }

}

Part of my web.xml where I'm defining the servlet mappings for the redirectors:

 
 ServletRedirector 
 org.apache.cactus.server.ServletTestRedirector 
 
 
 ServletRedirector 
 /ServletRedirector 



 ServletRedirectorSecure
 org.apache.cactus.server.ServletTestRedirector


 ServletRedirectorSecure
 /ServletRedirectorSecure



 ServletTestRunner
 
 org.apache.cactus.server.runner.ServletTestRunner
 



 ServletTestRunner
 /ServletTestRunner


Results/Stacktrac below:


−
 
−
 
−
 
org.apache.cactus.util.ChainedRuntimeException: Failed to connect to the 
secured redirector: http://localhost:8080/javaWebAppSec/ServletRedirector
 at 
org.apache.cactus.client.authentication.FormAuthentication.getSecureSessionIdCookie(FormAuthentication.java:315)
 at 
org.apache.cactus.client.authentication.FormAuthentication.authenticate_aroundBody10(FormAuthentication.java:354)
 at 
org.apache.cactus.client.authentication.FormAuthentication.authenticate_aroundBody11$advice(FormAuthentication.java:217)
 at 
org.apache.cactus.client.authentication.FormAuthentication.authenticate(FormAuthentication.java)
 at 
org.apache.cactus.client.authentication.FormAuthentication.configure_aroundBody0(FormAuthentication.java:105)
 at 
org.apache.cactus.client.authentication.FormAuthentication.configure_aroundBody1$advice(FormAuthentication.java:217)
 at 
org.apache.cactus.client.authentication.FormAuthentication.configure(FormAuthentication.java)
 at 
org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect_aroundBody0(HttpClientConnectionHelper.java:103)
 at 
org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect_aroundBody1$advice(HttpClientConnectionHelper.java:288)
 at 
org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect(HttpClientConnectionHelper.java)
 at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callRunTest(DefaultHttpClient.java:162)
 at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:80)
 at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:288)
 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:288)
 at 
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
 at 
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144

ChainedRuntimeException

2007-05-08 Thread Cody, John T
I'm getting a ChainedRuntimeException when I try to run my tests.  My 
application uses forms based authentication, and I know that the authentication 
piece is working and the error message says that it can't connect to the 
secured redirector.  Below is all the code that I can think of that might be 
relevant.  Any help you can provide would be great.

Thanks
john

Below is my ServletTestCase

package controller;
import java.util.ArrayList;

import org.apache.cactus.ServletTestCase;
import org.apache.cactus.WebRequest;
import org.apache.cactus.client.authentication.FormAuthentication;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

public class SesServletTestStuActions extends ServletTestCase {
 private int testCtr = 0;
 private static ArrayListString actions = new ArrayList();

 public void begin(WebRequest request) throws Exception {
  actions.add(index);
  actions.add(listClasses);
  actions.add(courseDetail);
  actions.add(listCourses);
  actions.add(logout);
  
  // This is the only action a student can't do.
  actions.add(listEntities);
  
//  We only need to authenticate the user once, for each ServletTestCase
  request.setAuthentication(new FormAuthentication([EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] , testStu)); 
  request.addParameter(action, actions.get(testCtr));

 }

 public void end(WebRequest request) throws Exception {
  actions = null;
  testCtr++;
 }
 
 // Testing actions that a student can do
 @Test
 public void testUserHasPermission1() throws Exception {
  SesServlet sesServlet = new SesServlet();
  assertTrue(The user can NOT perform this action, 
sesServlet.userHasPermission(request));
  
 }

}

Part of my web.xml where I'm defining the servlet mappings for the redirectors:

servlet 
servlet-nameServletRedirector/servlet-name 

servlet-classorg.apache.cactus.server.ServletTestRedirector/servlet-class 
/servlet 
servlet-mapping 
servlet-nameServletRedirector/servlet-name 
url-pattern/ServletRedirector/url-pattern 
/servlet-mapping

servlet
servlet-nameServletRedirectorSecure/servlet-name

servlet-classorg.apache.cactus.server.ServletTestRedirector/servlet-class
/servlet
servlet-mapping
servlet-nameServletRedirectorSecure/servlet-name
url-pattern/ServletRedirectorSecure/url-pattern
/servlet-mapping

servlet
servlet-nameServletTestRunner/servlet-name
servlet-class
org.apache.cactus.server.runner.ServletTestRunner
/servlet-class
/servlet

servlet-mapping
servlet-nameServletTestRunner/servlet-name
url-pattern/ServletTestRunner/url-pattern
/servlet-mapping

Results/Stacktrac below:

testsuites
−
 testsuite name=controller.SesServletTestStuActions tests=6 failures=0 
errors=6 time=0.327
−
 testcase name=testUserHasPermission1 time=0.139
−
 error message=Failed to connect to the secured redirector: 
http://localhost:8080/javaWebAppSec/ServletRedirector; 
type=org.apache.cactus.util.ChainedRuntimeException
org.apache.cactus.util.ChainedRuntimeException: Failed to connect to the 
secured redirector: http://localhost:8080/javaWebAppSec/ServletRedirector
 at 
org.apache.cactus.client.authentication.FormAuthentication.getSecureSessionIdCookie(FormAuthentication.java:315)
 at 
org.apache.cactus.client.authentication.FormAuthentication.authenticate_aroundBody10(FormAuthentication.java:354)
 at 
org.apache.cactus.client.authentication.FormAuthentication.authenticate_aroundBody11$advice(FormAuthentication.java:217)
 at 
org.apache.cactus.client.authentication.FormAuthentication.authenticate(FormAuthentication.java)
 at 
org.apache.cactus.client.authentication.FormAuthentication.configure_aroundBody0(FormAuthentication.java:105)
 at 
org.apache.cactus.client.authentication.FormAuthentication.configure_aroundBody1$advice(FormAuthentication.java:217)
 at 
org.apache.cactus.client.authentication.FormAuthentication.configure(FormAuthentication.java)
 at 
org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect_aroundBody0(HttpClientConnectionHelper.java:103)
 at 
org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect_aroundBody1$advice(HttpClientConnectionHelper.java:288)
 at 
org.apache.cactus.internal.client.connector.http.HttpClientConnectionHelper.connect(HttpClientConnectionHelper.java)
 at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callRunTest(DefaultHttpClient.java:162)
 at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:80)
 at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:288)
 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

RE: log not clear - 'ChainedRuntimeException: Failed to get the test results'

2005-11-17 Thread Magnus Grimsell
Check if you can access http://localhost:8080/cactusTest/ServletRedirector via 
a browser.
Maybe your web application is not deployed correctly or it is deployed under 
another context than cactusTest.

 -Original Message-
 From: Eric Wulff [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 17, 2005 3:27 AM
 To: Cactus Users List
 Subject: Re: log not clear - 'ChainedRuntimeException: Failed 
 to get the
 test results'
 
 
 Hi,
 
  It seems that /cactusTest/ServletRedirector does not exist.
  You might examine web.xml to see if ServletRedirector has 
 been properly mapped.
 
  Hope this helps,
 
 Well, I haven't solved the problem yet but perhaps took a step
 forward.  I checked my web.xml and all seems ok - even tried preceding
 with /cactusTest/ - bad sign when I'm taking blind stabs like that :( 
 .  Then I thought - perhaps ServletRedirector isn't where it should
 be.  Copied below are references to the cactus.jar and the web.xml for
 my test app.  ServletTestRedirctor should be in the cactus .jar -
 correct?  I believe I'm referencing that .jar in all the right places.
  Can you confirm?
 
 # ok, this is where I put the cactus binaries...
 /usr/local/jakarta-cactus-13-1.7.1/lib/cactus-1.7.1.jar
 # simlink to be picked up on CLASSPATH
 /usr/share/java/cactus-1.7.1.jar
 # available to all tomcat apps
 /usr/local/jakarta-tomcat-5.0.28/common/lib/cactus-1.7.1.jar
 # the app for testing cactus - dev env
 /home/ewulff/osshare/webdev/cactusTest/web/WEB-INF/lib/cactus-
 1.7.1.jar
 # on server (perhaps overkill since it's also in common/lib but I
 don't think this is causing a problem)
 /usr/local/jakarta-tomcat-5.0.28/webapps/cactusTest/WEB-INF/li
 b/cactus-1.7.1.jar
 
 web.xml...
 ?xml version=1.0 encoding=ISO-8859-1?
 
 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/j2ee/dtds/web-app_2_3.dtd;
 
 web-app
 
 filter
 filter-nameFilterRedirector/filter-name
 
 filter-classorg.apache.cactus.server.FilterTestRedirector/f
 ilter-class
 /filter
 
 filter-mapping
 filter-nameFilterRedirector/filter-name
 url-pattern/FilterRedirector/url-pattern
 /filter-mapping
 
 servlet
 servlet-nameServletRedirector/servlet-name
 
 servlet-classorg.apache.cactus.server.ServletTestRedirector
 /servlet-class
 /servlet
 
 servlet-mapping
 servlet-nameServletRedirector/servlet-name
 url-pattern/ServletRedirector/url-pattern
 /servlet-mapping
 
 servlet
 servlet-nameJspRedirector/servlet-name
 jsp-file/jspRedirector.jsp/jsp-file
 /servlet
 
 servlet-mapping
 servlet-nameJspRedirector/servlet-name
 url-pattern/JspRedirector/url-pattern
 /servlet-mapping
 
 /web-app
 
 many thx
 Eric
 
 oh yes, btw, here's all that I have in my WEB-INF/lib - lest something
 is stepping on toes...
 aspectjrt-1.2.1.jar   dom.jar   jdbc2_0-stdext.jar 
 sax.jar standard.jar
 cactus-1.7.1.jar  httpunit-1.6.jar  jstl.jar   
 saxpath.jar xalan.jar
 cactus-ant-1.7.1.jar  ifxjdbc.jar   junit-3.8.1.jar
 servletapi-2.3.jar  xercesImpl.jar
 commons-httpclient-2.0.2.jar  jaxen-full.jarlog4j-1.2.9.jar
 servlet-api.jar
 commons-logging-1.0.4.jar jaxp-api.jar  
 nekohtml-0.9.1.jar  sftp.jar
 
 
 
 On 11/16/05, Kazuhito SUGURI [EMAIL PROTECTED] wrote:
  Hi Eric,
 
  In article 
 [EMAIL PROTECTED],
  Wed, 16 Nov 2005 17:15:31 -0800,
  Eric Wulff [EMAIL PROTECTED] wrote:
  ewulff Hi, I'm getting a 'ChainedRuntimeException: Failed 
 to get the test
  ewulff results'.  Can someone tell me the most common 
 causes of that error?
 
  There are some possible causes. For your case, the log shows that.
 
  ewulff 1) 
 testDoGet(MapperServletTest)org.apache.cactus.util.ChainedRunt
 imeException:
  ewulff Failed to get the test results at
  ewulff [http://localhost:8080/cactusTest/ServletRedirector]
  [snip]
  ewulff org.apache.cactus.internal.client.ParsingException: 
 Not a valid
  ewulff response [404 /cactusTest/ServletRedirector]
  [snip]
  ewulff 2) 
 testUseAllCaps(MapperServletTest)org.apache.cactus.util.Chaine
dRuntimeException:
  ewulff Failed to get the test results at
  ewulff [http://localhost:8080/cactusTest/ServletRedirector]
  [snip]
  ewulff org.apache.cactus.internal.client.ParsingException: 
 Not a valid
  ewulff response [404 /cactusTest/ServletRedirector]
 
  It seems that /cactusTest/ServletRedirector does not exist.
  You might examine web.xml to see if ServletRedirector has 
 been properly mapped.
 
  Hope this helps,
  
  Kazuhito SUGURI
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e

Re: log not clear - 'ChainedRuntimeException: Failed to get the test results'

2005-11-17 Thread Eric Wulff
so sorry all, feel like I my stubbornness was a waste of your time. 
many thx for your help though!  I'm all better now  :).

Your repeated attempts to focus me on the context of my app lead me to
realize - duh, I was not accounting for web.xml in my build script. 
Therefore, yes - my web.xml was correct, but no - it wasn't doing me
any good because I wasn't copying it to the server side.

doh!

thx again
Eric


On 11/17/05, Magnus Grimsell [EMAIL PROTECTED] wrote:
 Check if you can access http://localhost:8080/cactusTest/ServletRedirector 
 via a browser.
 Maybe your web application is not deployed correctly or it is deployed under 
 another context than cactusTest.

  -Original Message-
  From: Eric Wulff [mailto:[EMAIL PROTECTED]
  Sent: Thursday, November 17, 2005 3:27 AM
  To: Cactus Users List
  Subject: Re: log not clear - 'ChainedRuntimeException: Failed
  to get the
  test results'
 
 
  Hi,
 
   It seems that /cactusTest/ServletRedirector does not exist.
   You might examine web.xml to see if ServletRedirector has
  been properly mapped.
  
   Hope this helps,
 
  Well, I haven't solved the problem yet but perhaps took a step
  forward.  I checked my web.xml and all seems ok - even tried preceding
  with /cactusTest/ - bad sign when I'm taking blind stabs like that :(
  .  Then I thought - perhaps ServletRedirector isn't where it should
  be.  Copied below are references to the cactus.jar and the web.xml for
  my test app.  ServletTestRedirctor should be in the cactus .jar -
  correct?  I believe I'm referencing that .jar in all the right places.
   Can you confirm?
 
  # ok, this is where I put the cactus binaries...
  /usr/local/jakarta-cactus-13-1.7.1/lib/cactus-1.7.1.jar
  # simlink to be picked up on CLASSPATH
  /usr/share/java/cactus-1.7.1.jar
  # available to all tomcat apps
  /usr/local/jakarta-tomcat-5.0.28/common/lib/cactus-1.7.1.jar
  # the app for testing cactus - dev env
  /home/ewulff/osshare/webdev/cactusTest/web/WEB-INF/lib/cactus-
  1.7.1.jar
  # on server (perhaps overkill since it's also in common/lib but I
  don't think this is causing a problem)
  /usr/local/jakarta-tomcat-5.0.28/webapps/cactusTest/WEB-INF/li
  b/cactus-1.7.1.jar
 
  web.xml...
  ?xml version=1.0 encoding=ISO-8859-1?
 
  !DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/j2ee/dtds/web-app_2_3.dtd;
 
  web-app
 
  filter
  filter-nameFilterRedirector/filter-name
 
  filter-classorg.apache.cactus.server.FilterTestRedirector/f
  ilter-class
  /filter
 
  filter-mapping
  filter-nameFilterRedirector/filter-name
  url-pattern/FilterRedirector/url-pattern
  /filter-mapping
 
  servlet
  servlet-nameServletRedirector/servlet-name
 
  servlet-classorg.apache.cactus.server.ServletTestRedirector
  /servlet-class
  /servlet
 
  servlet-mapping
  servlet-nameServletRedirector/servlet-name
  url-pattern/ServletRedirector/url-pattern
  /servlet-mapping
 
  servlet
  servlet-nameJspRedirector/servlet-name
  jsp-file/jspRedirector.jsp/jsp-file
  /servlet
 
  servlet-mapping
  servlet-nameJspRedirector/servlet-name
  url-pattern/JspRedirector/url-pattern
  /servlet-mapping
 
  /web-app
 
  many thx
  Eric
 
  oh yes, btw, here's all that I have in my WEB-INF/lib - lest something
  is stepping on toes...
  aspectjrt-1.2.1.jar   dom.jar   jdbc2_0-stdext.jar
  sax.jar standard.jar
  cactus-1.7.1.jar  httpunit-1.6.jar  jstl.jar
  saxpath.jar xalan.jar
  cactus-ant-1.7.1.jar  ifxjdbc.jar   junit-3.8.1.jar
  servletapi-2.3.jar  xercesImpl.jar
  commons-httpclient-2.0.2.jar  jaxen-full.jarlog4j-1.2.9.jar
  servlet-api.jar
  commons-logging-1.0.4.jar jaxp-api.jar
  nekohtml-0.9.1.jar  sftp.jar
 
 
 
  On 11/16/05, Kazuhito SUGURI [EMAIL PROTECTED] wrote:
   Hi Eric,
  
   In article
  [EMAIL PROTECTED],
   Wed, 16 Nov 2005 17:15:31 -0800,
   Eric Wulff [EMAIL PROTECTED] wrote:
   ewulff Hi, I'm getting a 'ChainedRuntimeException: Failed
  to get the test
   ewulff results'.  Can someone tell me the most common
  causes of that error?
  
   There are some possible causes. For your case, the log shows that.
  
   ewulff 1)
  testDoGet(MapperServletTest)org.apache.cactus.util.ChainedRunt
  imeException:
   ewulff Failed to get the test results at
   ewulff [http://localhost:8080/cactusTest/ServletRedirector]
   [snip]
   ewulff org.apache.cactus.internal.client.ParsingException:
  Not a valid
   ewulff response [404 /cactusTest/ServletRedirector]
   [snip]
   ewulff 2)
  testUseAllCaps(MapperServletTest)org.apache.cactus.util.Chaine
 dRuntimeException:
   ewulff Failed to get the test results at
   ewulff [http://localhost:8080/cactusTest/ServletRedirector]
   [snip]
   ewulff org.apache.cactus.internal.client.ParsingException:
  Not a valid
   ewulff response [404 /cactusTest

log not clear - 'ChainedRuntimeException: Failed to get the test results'

2005-11-16 Thread Eric Wulff
Hi, I'm getting a 'ChainedRuntimeException: Failed to get the test
results'.  Can someone tell me the most common causes of that error? 
I really don't know where to trouble shoot from here.  Let me tell you
what I've tried...

I turned on logging to find the error, as suggested via mailing list
and faq, but I'm sorry to say that it's not clearly given in the 600
DEBUG lines.  Perhaps I didn't turn on logging correctly but I hope
someone can confirm that I did based on these symptoms.  Note, with
debug off I only get a stack trace.  I copied that below but not the
logging output since it's extensive(again - 600 lines).

I also set the contextURL via cactus.properties and have no trailing
'/' which was a problem stated by someone else in the mail list
archives - so that's not the problem.

I'm running cactus 1.7.1, tomcat 5.0.28, log4j.

thx
Eric


command... output

# java junit.textui.TestRunner MapperServletTest
.E.E
Time: 0.175
There were 2 errors:
1) testDoGet(MapperServletTest)org.apache.cactus.util.ChainedRuntimeException:
Failed to get the test results at
[http://localhost:8080/cactusTest/ServletRedirector]
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 [404 /cactusTest/ServletRedirector]
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)
2) 
testUseAllCaps(MapperServletTest)org.apache.cactus.util.ChainedRuntimeException:
Failed to get the test results at
[http://localhost:8080/cactusTest/ServletRedirector]
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

Re: log not clear - 'ChainedRuntimeException: Failed to get the test results'

2005-11-16 Thread Kazuhito SUGURI
Hi Eric,

In article [EMAIL PROTECTED],
Wed, 16 Nov 2005 17:15:31 -0800,
Eric Wulff [EMAIL PROTECTED] wrote: 
ewulff Hi, I'm getting a 'ChainedRuntimeException: Failed to get the test
ewulff results'.  Can someone tell me the most common causes of that error? 

There are some possible causes. For your case, the log shows that.

ewulff 1) 
testDoGet(MapperServletTest)org.apache.cactus.util.ChainedRuntimeException:
ewulff Failed to get the test results at
ewulff [http://localhost:8080/cactusTest/ServletRedirector]
[snip]
ewulff org.apache.cactus.internal.client.ParsingException: Not a valid
ewulff response [404 /cactusTest/ServletRedirector]
[snip]
ewulff 2) 
testUseAllCaps(MapperServletTest)org.apache.cactus.util.ChainedRuntimeException:
ewulff Failed to get the test results at
ewulff [http://localhost:8080/cactusTest/ServletRedirector]
[snip]
ewulff org.apache.cactus.internal.client.ParsingException: Not a valid
ewulff response [404 /cactusTest/ServletRedirector]

It seems that /cactusTest/ServletRedirector does not exist.
You might examine web.xml to see if ServletRedirector has been properly mapped.

Hope this helps,

Kazuhito SUGURI

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: log not clear - 'ChainedRuntimeException: Failed to get the test results'

2005-11-16 Thread Eric Wulff
Hi,

 It seems that /cactusTest/ServletRedirector does not exist.
 You might examine web.xml to see if ServletRedirector has been properly 
 mapped.

 Hope this helps,

Well, I haven't solved the problem yet but perhaps took a step
forward.  I checked my web.xml and all seems ok - even tried preceding
with /cactusTest/ - bad sign when I'm taking blind stabs like that :( 
.  Then I thought - perhaps ServletRedirector isn't where it should
be.  Copied below are references to the cactus.jar and the web.xml for
my test app.  ServletTestRedirctor should be in the cactus .jar -
correct?  I believe I'm referencing that .jar in all the right places.
 Can you confirm?

# ok, this is where I put the cactus binaries...
/usr/local/jakarta-cactus-13-1.7.1/lib/cactus-1.7.1.jar
# simlink to be picked up on CLASSPATH
/usr/share/java/cactus-1.7.1.jar
# available to all tomcat apps
/usr/local/jakarta-tomcat-5.0.28/common/lib/cactus-1.7.1.jar
# the app for testing cactus - dev env
/home/ewulff/osshare/webdev/cactusTest/web/WEB-INF/lib/cactus-1.7.1.jar
# on server (perhaps overkill since it's also in common/lib but I
don't think this is causing a problem)
/usr/local/jakarta-tomcat-5.0.28/webapps/cactusTest/WEB-INF/lib/cactus-1.7.1.jar

web.xml...
?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/j2ee/dtds/web-app_2_3.dtd;

web-app

filter
filter-nameFilterRedirector/filter-name

filter-classorg.apache.cactus.server.FilterTestRedirector/filter-class
/filter

filter-mapping
filter-nameFilterRedirector/filter-name
url-pattern/FilterRedirector/url-pattern
/filter-mapping

servlet
servlet-nameServletRedirector/servlet-name

servlet-classorg.apache.cactus.server.ServletTestRedirector/servlet-class
/servlet

servlet-mapping
servlet-nameServletRedirector/servlet-name
url-pattern/ServletRedirector/url-pattern
/servlet-mapping

servlet
servlet-nameJspRedirector/servlet-name
jsp-file/jspRedirector.jsp/jsp-file
/servlet

servlet-mapping
servlet-nameJspRedirector/servlet-name
url-pattern/JspRedirector/url-pattern
/servlet-mapping

/web-app

many thx
Eric

oh yes, btw, here's all that I have in my WEB-INF/lib - lest something
is stepping on toes...
aspectjrt-1.2.1.jar   dom.jar   jdbc2_0-stdext.jar 
sax.jar standard.jar
cactus-1.7.1.jar  httpunit-1.6.jar  jstl.jar   
saxpath.jar xalan.jar
cactus-ant-1.7.1.jar  ifxjdbc.jar   junit-3.8.1.jar
servletapi-2.3.jar  xercesImpl.jar
commons-httpclient-2.0.2.jar  jaxen-full.jarlog4j-1.2.9.jar
servlet-api.jar
commons-logging-1.0.4.jar jaxp-api.jar  nekohtml-0.9.1.jar  sftp.jar



On 11/16/05, Kazuhito SUGURI [EMAIL PROTECTED] wrote:
 Hi Eric,

 In article [EMAIL PROTECTED],
 Wed, 16 Nov 2005 17:15:31 -0800,
 Eric Wulff [EMAIL PROTECTED] wrote:
 ewulff Hi, I'm getting a 'ChainedRuntimeException: Failed to get the test
 ewulff results'.  Can someone tell me the most common causes of that error?

 There are some possible causes. For your case, the log shows that.

 ewulff 1) 
 testDoGet(MapperServletTest)org.apache.cactus.util.ChainedRuntimeException:
 ewulff Failed to get the test results at
 ewulff [http://localhost:8080/cactusTest/ServletRedirector]
 [snip]
 ewulff org.apache.cactus.internal.client.ParsingException: Not a valid
 ewulff response [404 /cactusTest/ServletRedirector]
 [snip]
 ewulff 2) 
 testUseAllCaps(MapperServletTest)org.apache.cactus.util.ChainedRuntimeException:
 ewulff Failed to get the test results at
 ewulff [http://localhost:8080/cactusTest/ServletRedirector]
 [snip]
 ewulff org.apache.cactus.internal.client.ParsingException: Not a valid
 ewulff response [404 /cactusTest/ServletRedirector]

 It seems that /cactusTest/ServletRedirector does not exist.
 You might examine web.xml to see if ServletRedirector has been properly 
 mapped.

 Hope this helps,
 
 Kazuhito SUGURI

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ChainedRuntimeException: Failed to get the test results at http:...//ServletRedirector

2005-09-18 Thread Kazuhito SUGURI
Hi Phlip,

In article [EMAIL PROTECTED],
Fri, 16 Sep 2005 12:07:50 -0700,
Phlip [EMAIL PROTECTED] wrote: 
phlip2005 compile-test:
phlip2005 log4j:ERROR setFile(null,false) call failed.
phlip2005 java.io.FileNotFoundException: @[EMAIL PROTECTED] (The
phlip2005 system cannot find the path specified)

You (your build system) should rewrite @target.dir@ properly.


phlip2005  phlip2005 Then it doesn't say where to put the files. I use the 
Tomcat bundled
phlip2005  phlip2005 with NetBeans, and there is another Tomcat available.
phlip2005  phlip2005 
phlip2005  phlip2005 Please don't just say on the class path. Where do 
those files go?
phlip2005  
phlip2005  How about WEB-INF/classes?
phlip2005 
phlip2005 build/web/WEB-INF/classes or ? ;-)

It's depending on your build system.
Finally siginificant is a cactified application deployed to your server
even if the source is where.
The files should exist on your server-side classpath
and WEB-INF/classes of your cactified application is one of them.

I've never userd NetBeans. So, please don't ask me how ;-)

Kazuhito SUGURI

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ChainedRuntimeException: Failed to get the test results at http:...//ServletRedirector

2005-09-16 Thread Kazuhito SUGURI
Hi Phlip,

In article [EMAIL PROTECTED],
Wed, 14 Sep 2005 14:24:12 -0700,
Phlip [EMAIL PROTECTED] wrote: 
phlip2005 
testSuccessfulLogin(TestLoginAction)org.apache.cactus.util.ChainedRuntimeException:
phlip2005 Failed to get the test results at
phlip2005 [http://localhost:8084/StrutsTest//ServletRedirector]

'//' in the URL may be the cause.
Could you verify that your contextURL is not ends with '/'?


phlip2005 Then it doesn't say where to put the files. I use the Tomcat bundled
phlip2005 with NetBeans, and there is another Tomcat available.
phlip2005 
phlip2005 Please don't just say on the class path. Where do those files go?

How about WEB-INF/classes?

Hope this helps,

Kazuhito SUGURI

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ChainedRuntimeException: Failed to get the test results at http:...//ServletRedirector

2005-09-16 Thread Phlip
Kazuhito SUGURI wrote:

 phlip2005 [http://localhost:8084/StrutsTest//ServletRedirector]
 
 '//' in the URL may be the cause.
 Could you verify that your contextURL is not ends with '/'?

Thanks that was it! The cactus.properties file has a cactus.contextURL
line that should not have a trailing /

(Until now I was unaware that web servers don't follow the rule that
file servers do, a double slash, //, is accepted as a convenience for
scripts that glue paths. Web servers don't allow that.)

Could someone convert this thread to a page on
http://wiki.apache.org/jakarta-cactus/ , so Google-PhDs like me don't
get confused again?

Now we have THIS problem:

compile-test:
log4j:ERROR setFile(null,false) call failed.
java.io.FileNotFoundException: @[EMAIL PROTECTED] (The
system cannot find the path specified)
...
There were 2 errors:
1) 
testSuccessfulLogin(TestLoginAction)org.apache.cactus.util.ChainedRuntimeException:
Failed to get the test results at
[http://localhost:8084/StrutsTest/ServletRedirector]

So it seems that my feeb attempt to turn on the log4j system has failed.

Please don't tell me to read
http://jakarta.apache.org/cactus/integration/manual/howto_config.html#logging
- that's what caused this error. I don't understand what folders to
put those log4j.properties files in, for NetBeans.

 phlip2005 Then it doesn't say where to put the files. I use the Tomcat 
 bundled
 phlip2005 with NetBeans, and there is another Tomcat available.
 phlip2005 
 phlip2005 Please don't just say on the class path. Where do those files go?
 
 How about WEB-INF/classes?

build/web/WEB-INF/classes or ? ;-)

-- 
  Phlip
  http://www.greencheese.org/ZeekLand  -- NOT a blog!!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ChainedRuntimeException: Failed to get the test results at http:...//ServletRedirector

2005-09-14 Thread Phlip
Cactusizers:

I'm trying to get the StrutsTest sample from
http://strutstestcase.sourceforge.net/ working, in NetBeans, with the
CactusStrutsTestCase. After upgrading the project to use that jar,
filling in a bunch of other jars, and tweaking cactus.properties, I
get this familiar error message:

testSuccessfulLogin(TestLoginAction)org.apache.cactus.util.ChainedRuntimeException:
Failed to get the test results at
[http://localhost:8084/StrutsTest//ServletRedirector]

So Google soon leads me to its FAQ:

http://jakarta.apache.org/cactus/faq.html#faq_failed_to_get_test_results

Which tells me to turn on logging using this simple technique:

http://jakarta.apache.org/cactus/integration/manual/howto_config.html#logging

That seems to be saying to write log4j.properties files, with all that
stuff in them.

Then it doesn't say where to put the files. I use the Tomcat bundled
with NetBeans, and there is another Tomcat available.

Please don't just say on the class path. Where do those files go? or
is there a /reliable/ way to turn logging on from inside the test
case?

-- 
  Phlip
  http://www.greencheese.org/ZeekLand  -- NOT a blog!!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



WSAD Cactus: ChainedRuntimeException: Missing Cactus property [cactus.contextURL]

2005-03-01 Thread jfggdl
Hi!

I am using WSAD 5.1.1 which is based on Eclipse. I setup cactus just as 
described in the web site. However, when I try to run a ServletTestCase I get 
the following message (see below). I have already setup a cactus.properties 
file with a cactus.contextURL=http://localhost:9080/MyEARProjectName/testCactus

Any help would be greatly appreciated

By the way, I am trying to get more information on the function of the 
cactus.contextURL function in the whole Cactus framework. Any onformation on 
how the name of the servlet (URL) is related to the ServletTestCase that I 
extend?

Thanks

org.apache.cactus.util.ChainedRuntimeException: Missing Cactus property 
[cactus.contextURL]
at 
org.apache.cactus.internal.configuration.BaseConfiguration.getContextURL(BaseConfiguration.java:59)
at 
org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL_aroundBody0(AbstractWebConfiguration.java:46)
at 
org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL_aroundBody1$advice(AbstractWebConfiguration.java:306)
at 
org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL(AbstractWebConfiguration.java)
at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callRunTest(DefaultHttpClient.java:159)
at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:80)
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)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)



__
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: WSAD Cactus: ChainedRuntimeException: Missing Cactus proper ty [cactus.contextURL]

2005-03-01 Thread Korver, Aaron
I am running the same configuration.  You have to put the cactus.properties
file in the WEB-INF/classes folder of the web project.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 01, 2005 1:00 PM
 To: cactus-user@jakarta.apache.org
 Subject: WSAD  Cactus: ChainedRuntimeException: Missing 
 Cactus property
 [cactus.contextURL]
 
 
 Hi!
 
 I am using WSAD 5.1.1 which is based on Eclipse. I setup 
 cactus just as described in the web site. However, when I try 
 to run a ServletTestCase I get the following message (see 
 below). I have already setup a cactus.properties file with a 
 cactus.contextURL=http://localhost:9080/MyEARProjectName/testCactus
 
 Any help would be greatly appreciated
 
 By the way, I am trying to get more information on the 
 function of the cactus.contextURL function in the whole 
 Cactus framework. Any onformation on how the name of the 
 servlet (URL) is related to the ServletTestCase that I extend?
 
 Thanks
 
 org.apache.cactus.util.ChainedRuntimeException: Missing 
 Cactus property [cactus.contextURL]
 at 
 org.apache.cactus.internal.configuration.BaseConfiguration.get
 ContextURL(BaseConfiguration.java:59)
 at 
 org.apache.cactus.internal.configuration.AbstractWebConfigurat
 ion.getRedirectorURL_aroundBody0(AbstractWebConfiguration.java:46)
 at 
 org.apache.cactus.internal.configuration.AbstractWebConfigurat
 ion.getRedirectorURL_aroundBody1$advice(AbstractWebConfigurati
 on.java:306)
 at 
 org.apache.cactus.internal.configuration.AbstractWebConfigurat
 ion.getRedirectorURL(AbstractWebConfiguration.java)
 at 
 org.apache.cactus.internal.client.connector.http.DefaultHttpCl
 ient.callRunTest(DefaultHttpClient.java:159)
 at 
 org.apache.cactus.internal.client.connector.http.DefaultHttpCl
 ient.doTest_aroundBody0(DefaultHttpClient.java:80)
 at 
 org.apache.cactus.internal.client.connector.http.DefaultHttpCl
 ient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
 at 
 org.apache.cactus.internal.client.connector.http.DefaultHttpCl
 ient.doTest(DefaultHttpClient.java)
 at 
 org.apache.cactus.internal.client.connector.http.HttpProtocolH
 andler.runWebTest(HttpProtocolHandler.java:159)
 at 
 org.apache.cactus.internal.client.connector.http.HttpProtocolH
 andler.runTest_aroundBody0(HttpProtocolHandler.java:80)
 at 
 org.apache.cactus.internal.client.connector.http.HttpProtocolH
 andler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
 at 
 org.apache.cactus.internal.client.connector.http.HttpProtocolH
 andler.runTest(HttpProtocolHandler.java)
 at 
 org.apache.cactus.internal.client.ClientTestCaseCaller.runTest
 (ClientTestCaseCaller.java:144)
 at 
 org.apache.cactus.internal.AbstractCactusTestCase.runBareClien
 t(AbstractCactusTestCase.java:215)
 at 
 org.apache.cactus.internal.AbstractCactusTestCase.runBare(Abst
 ractCactusTestCase.java:133)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run(TestSuite.java:203)
 at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTest
 s(RemoteTestRunner.java:392)
 at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(Rem
 oteTestRunner.java:276)
 at 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(Re
 moteTestRunner.java:167)
 
 
 
 __
 Switch to Netscape Internet Service.
 As low as $9.95 a month -- Sign up today at 
http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: ChainedRuntimeException with Struts and Cactus

2003-12-05 Thread Vincent Massol
Hi David,

In order to help you further, I would need you to enable cactus logging
and send us the client and server logs.

Thanks
-Vincent

 -Original Message-
 From: David Stemm [mailto:[EMAIL PROTECTED]
 Sent: 05 December 2003 18:51
 To: [EMAIL PROTECTED]
 Subject: ChainedRuntimeException with Struts and Cactus
 
 All,
I'm trying to incorporate Cactus 1.5 into my Struts 1.1 application
 using Tomcat 4.1.29.  I configured the Cactus samples to run through
my
 Ant script and everything works fine and all the tests run
successfully.
 When I simply add the commons-*.jar files needed for struts I get the
 ChainedRuntimeException (full error below) when I run my Ant script.
So I
 tried adding the jars 1 at a time and then run my Ant script.  The
tests
 run OK until I add the commons-digester.jar which then causes it to
fail.
 Has anybody seen this before or have a work-around?  Has anybody
 configured Cactus to work with Struts?  Any help would be appreciated.
 Thanks.
 
 David Stemm
 
 Error Message:
 [cactus] Testcase:
 testOut(org.apache.cactus.sample.unit.TestJspOut):Caused an ERROR
 [cactus] Failed to get the test results at
[http://localhost:8081/stemm-
 cactified/JspRedirector]
 [cactus] org.apache.cactus.util.ChainedRuntimeException: Failed to get
the
 test results at [http://localhost:8081/stemm-cactified/JspRedirector]
 [cactus] at

org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundB
od
 y0(DefaultHttpClient.java:131)
 [cactus] at

org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundB
od
 y1$advice(DefaultHttpClient.java:240)
 [cactus] at

org.apache.cactus.client.connector.http.DefaultHttpClient.doTest(Default
Ht
 tpClient.java)
 [cactus] at

org.apache.cactus.internal.client.WebClientTestCaseDelegate.runWebTest(W
eb
 ClientTestCaseDelegate.java:333)
 [cactus] at

org.apache.cactus.internal.client.WebClientTestCaseDelegate.runGenericTe
st
 (WebClientTestCaseDelegate.java:281)
 [cactus] at

org.apache.cactus.internal.client.WebClientTestCaseDelegate.runTest(WebC
li
 entTestCaseDelegate.java:257)
 [cactus] at

org.apache.cactus.ServletTestCase.runCactusTest(ServletTestCase.java:300
)
 [cactus] at
 org.apache.cactus.ServletTestCase.runBare(ServletTestCase.java:263)
 [cactus] org.apache.cactus.client.ParsingException: Not a valid
response
 [500 Internal Server Error]
 [cactus] at

org.apache.cactus.client.connector.http.DefaultHttpClient.callGetResult(
De
 faultHttpClient.java:249)
 [cactus] at

org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundB
od
 y0(DefaultHttpClient.java:126)
 [cactus] at

org.apache.cactus.client.connector.http.DefaultHttpClient.doTest_aroundB
od
 y1$advice(DefaultHttpClient.java:240)
 [cactus] at

org.apache.cactus.client.connector.http.DefaultHttpClient.doTest(Default
Ht
 tpClient.java)
 [cactus] at

org.apache.cactus.internal.client.WebClientTestCaseDelegate.runWebTest(W
eb
 ClientTestCaseDelegate.java:333)
 [cactus] at

org.apache.cactus.internal.client.WebClientTestCaseDelegate.runGenericTe
st
 (WebClientTestCaseDelegate.java:281)
 [cactus] at

org.apache.cactus.internal.client.WebClientTestCaseDelegate.runTest(WebC
li
 entTestCaseDelegate.java:257)
 [cactus] at

org.apache.cactus.ServletTestCase.runCactusTest(ServletTestCase.java:300
)
 [cactus] at
 org.apache.cactus.ServletTestCase.runBare(ServletTestCase.java:263)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]