jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Troy Gould" <t...@dooyoo.co.uk>
Subject java.lang.NoSuchMethodError
Date Fri, 23 Nov 2001 11:19:24 GMT
Why would I be getting this error?

Code is very trivial and listed below....

java.lang.NoSuchMethodError
	at
org.apache.cactus.WebResponse.getCookies(WebResponse.java:255)
	at
test.com.dooyoo.user.incentive.UserRewardAccountServletTest.endLogin(Use
rRewardAccountServletTest.java:153)
	at java.lang.reflect.Method.invoke(Native Method)
	at
org.apache.cactus.AbstractTestCase.callEndMethod(AbstractTestCase.java:3
04)
	at
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:
425)
	at
org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:130)
	at
org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:371)
	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:131)
	at junit.framework.TestSuite.runTest(TestSuite.java:173)
	at junit.framework.TestSuite.run(TestSuite.java:168)
	at junit.textui.TestRunner.doRun(TestRunner.java:74)
	at junit.textui.TestRunner.run(TestRunner.java:200)
	at
test.com.dooyoo.user.incentive.UserRewardAccountServletTest.main(UserRew
ardAccountServletTest.java:50)




    public void beginLogin(WebRequest webRequest) {

        webRequest.setURL("localhost:7001", "/Aurora", "/login", null,
"NAME=test21&PASSWORD=test21&action=login");

    }


    public void testLogin() throws IOException, ServletException {

            UserLoginServlet servlet = new UserLoginServlet();

            servlet.init(config);

            servlet.doPost(request, response);

    }


    public void endLogin(org.apache.cactus.WebResponse webResponse) {

            Cookie []cookies = webResponse.getCookies();      // error
is created here!
            if (log.isDebugEnabled()) {
                log.debug("Get cookies");
                for (int i = 0 ; i < cookies.length; i++) {
                    log.debug("Cookie Name: " + cookies[i].getName() + "
Value: " + cookies[i].getValue());
                }
            }

            assertNotNull(webResponse.getText());

    }





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


Mime
View raw message