Oh, sorry for omitting this.... nightly build 20021028 is the one I tried and got the errors below....

Erik Hatcher wrote:
I decided to try out a Struts nightly build (from a previous 1.1beta2 version) and I ran our Cactus test suite to see if all validated ok... but I'm getting all Struts tests failing with this error:

String index out of range: -1

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1520)
at
org.apache.struts.util.RequestUtils.selectApplication(RequestUtils.java:
1462)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1290)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:502)
at
servletunit.struts.CactusStrutsTestCase.actionPerform(CactusStrutsTestCa
se.java:384)

As you can see, I'm using StrutsTestCase on top of Cactus, and my test case looks like this:


public void testValidation() throws Exception {
setRequestPathInfo("/saveProfile");
ProfileForm form = new ProfileForm();
form.setMailForward("[EMAIL PROTECTED]");
addToParameters(form);
actionPerform();
verifyNoActionErrors();
}

This problem could certainly be in StrutsTestCase or in my custom 'addToParameters(form)' method? - but not likely there since thats a pretty trivial method to put all form properties in the request. The tests worked fine with Struts 1.1beta2, so the only thing that changed was our version of Struts.

Thoughts? I'll drop back to 1.1beta2 until something is resolved in either StrutsTestCase or Struts. Any clues on what changed that could have caused this?

Thanks,
Erik




--
To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

Reply via email to