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 "Sankula, Kameswara" <ka...@qwest.com> on 2003/09/18 20:45:11 UTC

Cactus errors

Hi 
I am running a test case which will use CactusStrutsTestCase in weblogic 7.0

I am gettig the following error when I ran the class TestCactusLoginAction 
I don't know what's happening ?????
Can any one of u help me in solving this ???
testXXX(test.com.qwest.rmc.domain.TestCactusLoginAction)java.lang.NoSuchMeth
odError
	at
org.apache.cactus.client.connector.http.HttpClientConnectionHelper.dispatch5
0_connect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspe
ct.aj[1k]:177)
	at
org.apache.cactus.client.connector.http.HttpClientConnectionHelper.around50_
connect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect
.aj[1k]:1240)
	at
org.apache.cactus.client.connector.http.HttpClientConnectionHelper.connect(H
ttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj[1k]:1
14)
	at
org.apache.cactus.client.connector.http.DefaultHttpClient.callRunTest(Defaul
tHttpClient.java;org/apache/cactus/util/log/LogAspect.aj[1k]:201)
	at
org.apache.cactus.client.connector.http.DefaultHttpClient.dispatch49_doTest(
DefaultHttpClient.java;org/apache/cactus/util/log/LogAspect.aj[1k]:119)
	at
org.apache.cactus.client.connector.http.DefaultHttpClient.around49_doTest(De
faultHttpClient.java;org/apache/cactus/util/log/LogAspect.aj[1k]:1240)
	at
org.apache.cactus.client.connector.http.DefaultHttpClient.doTest(DefaultHttp
Client.java;org/apache/cactus/util/log/LogAspect.aj[1k]:115)
	at
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runWebTest(WebCl
ientTestCaseDelegate.java;org/apache/cactus/util/log/LogAspect.aj[1k]:334)
	at
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runGenericTest(W
ebClientTestCaseDelegate.java;org/apache/cactus/util/log/LogAspect.aj[1k]:28
2)
	at
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runTest(WebClien
tTestCaseDelegate.java;org/apache/cactus/util/log/LogAspect.aj[1k]:258)
	at
org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:289)
	at
org.apache.cactus.ServletTestCase.runBare(ServletTestCase.java:251)
	at
test.com.qwest.rmc.domain.TestCactusLoginAction.main(TestCactusLoginAction.j
ava:62)

Here is my class 
public class TestCactusLoginAction extends CactusStrutsTestCase    {

   public TestCactusLoginAction(String testName) {
       super(testName);
   }


    public void testXXX() {
        System.out.println("Inside the testSuccesful Login");
        setRequestPathInfo("/login");
        addRequestParameter("customerId","png");
        addRequestParameter("userId","andersoa");
        System.out.println("After setting the bean parameters");
        actionPerform();
        System.out.println("After Actionform ");
        verifyForward("OK");
	    verifyForwardPath("/rmc/startordr/StartOrder.jsp");
      //  TestCase.assertEquals("deryl",
getSession().getAttribute("authentication"));
         verifyNoActionErrors();
    }

    /**
    public void testFailedLogin() {

        addRequestParameter("username","deryl");
        addRequestParameter("password","express");
        setRequestPathInfo("/login");
        actionPerform();
        verifyForward("login");
	    verifyForwardPath("/login/login.jsp");
	    verifyInputForward();
        verifyActionErrors(new String[] {"error.password.mismatch"});
        TestCase.assertNull(getSession().getAttribute("authentication"));
    }

    **/
    public static void main (String[] args)
     {
		junit.textui.TestRunner.run (TestCactusLoginAction.class);
	}




}


RE: Cactus errors

Posted by Vincent Massol <vm...@pivolis.com>.
Hi,

Please do not crosspost.

The reason for the error is:

testXXX(test.com.qwest.rmc.domain.TestCactusLoginAction)java.lang.NoSuch
MethodError

Which means what it means :-) i.e. there is no such method in your
file...

-Vincent

> -----Original Message-----
> From: Sankula, Kameswara [mailto:kameswara.sankula@qwest.com]
> Sent: 18 September 2003 20:45
> To: 'cactus-user@jakarta.apache.org'
> Cc: 'cactus-dev@jakarta.apache.org'
> Subject: Cactus errors
> 
> Hi
> I am running a test case which will use CactusStrutsTestCase in
weblogic
> 7.0
> 
> I am gettig the following error when I ran the class
TestCactusLoginAction
> I don't know what's happening ?????
> Can any one of u help me in solving this ???
>
testXXX(test.com.qwest.rmc.domain.TestCactusLoginAction)java.lang.NoSuch
Me
> th
> odError
> 	at
>
org.apache.cactus.client.connector.http.HttpClientConnectionHelper.dispa
tc
> h5
>
0_connect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/Log
As
> pe
> ct.aj[1k]:177)
> 	at
>
org.apache.cactus.client.connector.http.HttpClientConnectionHelper.aroun
d5
> 0_
>
connect(HttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAs
pe
> ct
> .aj[1k]:1240)
> 	at
>
org.apache.cactus.client.connector.http.HttpClientConnectionHelper.conne
ct
> (H
>
ttpClientConnectionHelper.java;org/apache/cactus/util/log/LogAspect.aj[1
k]
> :1
> 14)
> 	at
>
org.apache.cactus.client.connector.http.DefaultHttpClient.callRunTest(De
fa
> ul
> tHttpClient.java;org/apache/cactus/util/log/LogAspect.aj[1k]:201)
> 	at
>
org.apache.cactus.client.connector.http.DefaultHttpClient.dispatch49_doT
es
> t(
>
DefaultHttpClient.java;org/apache/cactus/util/log/LogAspect.aj[1k]:119)
> 	at
>
org.apache.cactus.client.connector.http.DefaultHttpClient.around49_doTes
t(
> De
> faultHttpClient.java;org/apache/cactus/util/log/LogAspect.aj[1k]:1240)
> 	at
>
org.apache.cactus.client.connector.http.DefaultHttpClient.doTest(Default
Ht
> tp
> Client.java;org/apache/cactus/util/log/LogAspect.aj[1k]:115)
> 	at
>
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runWebTest(W
eb
> Cl
>
ientTestCaseDelegate.java;org/apache/cactus/util/log/LogAspect.aj[1k]:33
4)
> 	at
>
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runGenericTe
st
> (W
>
ebClientTestCaseDelegate.java;org/apache/cactus/util/log/LogAspect.aj[1k
]:
> 28
> 2)
> 	at
>
org.apache.cactus.internal.client.WebClientTestCaseDelegate.runTest(WebC
li
> en
>
tTestCaseDelegate.java;org/apache/cactus/util/log/LogAspect.aj[1k]:258)
> 	at
> org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:289)
> 	at
> org.apache.cactus.ServletTestCase.runBare(ServletTestCase.java:251)
> 	at
>
test.com.qwest.rmc.domain.TestCactusLoginAction.main(TestCactusLoginActi
on
> .j
> ava:62)
> 
> Here is my class
> public class TestCactusLoginAction extends CactusStrutsTestCase    {
> 
>    public TestCactusLoginAction(String testName) {
>        super(testName);
>    }
> 
> 
>     public void testXXX() {
>         System.out.println("Inside the testSuccesful Login");
>         setRequestPathInfo("/login");
>         addRequestParameter("customerId","png");
>         addRequestParameter("userId","andersoa");
>         System.out.println("After setting the bean parameters");
>         actionPerform();
>         System.out.println("After Actionform ");
>         verifyForward("OK");
> 	    verifyForwardPath("/rmc/startordr/StartOrder.jsp");
>       //  TestCase.assertEquals("deryl",
> getSession().getAttribute("authentication"));
>          verifyNoActionErrors();
>     }
> 
>     /**
>     public void testFailedLogin() {
> 
>         addRequestParameter("username","deryl");
>         addRequestParameter("password","express");
>         setRequestPathInfo("/login");
>         actionPerform();
>         verifyForward("login");
> 	    verifyForwardPath("/login/login.jsp");
> 	    verifyInputForward();
>         verifyActionErrors(new String[] {"error.password.mismatch"});
>
TestCase.assertNull(getSession().getAttribute("authentication"));
>     }
> 
>     **/
>     public static void main (String[] args)
>      {
> 		junit.textui.TestRunner.run
(TestCactusLoginAction.class);
> 	}
> 
> 
> 
> 
> }