jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yuguang sun" <su...@iname.com>
Subject RE: testSendCookie error - TestSampleServlet
Date Wed, 22 May 2002 23:31:30 GMT
Hello Vincent,

Thanks a lot for your message. I have found out the reason which caused the exception. In
the 
beginSendCookie() method of sample servlet, the statement:
theRequest.addCookie("testcookie", "thisisacookie");

is not fit to test servlet on remote machine. In WebRequest.java, the addCookie() method with
two 
parameters means to set domain to localhost, but there is no web server running on my localhost.

By the way, I think CACTUS is an excellent program. I wonder if  there is a design document
like class 
diagram etc. available for users to read. On the other side that in the future, we probably
met similar 
problems. Things will be easier If we can print out messages to figure out if is caused by
the wrong way to 
use CACTUS or some thing wrong with the program under test.

Roger


----- Original Message -----
From: "Vincent Massol" <vmassol@octo.com>
Date: Wed, 22 May 2002 09:23:07 +0100
To: "'Cactus Users List'" <cactus-user@jakarta.apache.org>
Subject: RE: testSendCookie error - TestSampleServlet


> Hi Roger,
> 
> I have never tried to run Cactus on IPlanet. Some have done that in the
> past and have reported on this newsgroup (check the archives). I can't
> recall any specific problem WRT cookies.
>  
> If you could enable cactus logging and send the relevant portion of log,
> that would help.
> 
> Looking at line 406, it seems the reason is because HttpClient fails to
> create a valid cookie. This is probably due because Cactus is passing to
> it either an invalid domain or an invalid cookie path. Now, as to why it
> might be doing this ... we need the logs.
> 
> Thanks
> -Vincent
> 
> > -----Original Message-----
> > From: yuguang sun [mailto:sunyg@iname.com]
> > Sent: 22 May 2002 00:58
> > To: cactus-user@jakarta.apache.org
> > Subject: testSendCookie error - TestSampleServlet
> > 
> > Hi!
> > 
> > I try to run TestSampleServlet. But I get following exceptions. Does
> any
> > one have idea about that? I am using iplanet 6 web server on DS-10.
> cactus
> > version is 1.3 as well.
> > 
> > 
> > ........E.E....
> > Time: 1.647
> > There were 2 errors:
> > 1) testSendCookie(org.apache.cactus.sample.TestSampleServlet)
> > java.lang.NullPointerException
> >         at
> >
> org.apache.cactus.client.HttpClientHelper.addCookies(HttpClientHelper.ja
> va
> > ;org/apache/cactus/util/log/LogAspect.java(1k):406)
> >         at
> >
> org.apache.cactus.client.HttpClientHelper.dispatch22_connect(HttpClientH
> el
> > per.java;org/apache/cactus/util/log/LogAspect.java(1k):165)
> >         at
> >
> org.apache.cactus.client.HttpClientHelper.around22_connect(HttpClientHel
> pe
> > r.java;org/apache/cactus/util/log/LogAspect.java(1k):1221)
> >         at
> >
> org.apache.cactus.client.HttpClientHelper.connect(HttpClientHelper.java;
> or
> > g/apache/cactus/util/log/LogAspect.java(1k):125)
> >         at
> >
> org.apache.cactus.client.AbstractHttpClient.callRunTest(AbstractHttpClie
> nt
> > .java;org/apache/cactus/util/log/LogAspect.java(1k):188)
> >         at
> >
> org.apache.cactus.client.AbstractHttpClient.dispatch1_doTest(AbstractHtt
> pC
> > lient.java;org/apache/cactus/util/log/LogAspect.java(1k):120)
> >         at
> >
> org.apache.cactus.client.AbstractHttpClient.around1_doTest(AbstractHttpC
> li
> > ent.java;org/apache/cactus/util/log/LogAspect.java(1k):1221)
> >         at
> >
> org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.ja
> va
> > ;org/apache/cactus/util/log/LogAspect.java(1k):115)
> >         at
> >
> org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:
> 45
> > 7)
> >         at
> > org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)
> >         at
> > org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:400)
> >         at
> >
> org.apache.cactus.sample.TestSampleServlet.main(TestSampleServlet.java:9
> 6)
> > 2) testSendMultipleCookies(org.apache.cactus.sample.TestSampleServlet)
> > java.lang.NullPointerException
> >         at
> >
> org.apache.cactus.client.HttpClientHelper.addCookies(HttpClientHelper.ja
> va
> > ;org/apache/cactus/util/log/LogAspect.java(1k):406)
> >         at
> >
> org.apache.cactus.client.HttpClientHelper.dispatch22_connect(HttpClientH
> el
> > per.java;org/apache/cactus/util/log/LogAspect.java(1k):165)
> >         at
> >
> org.apache.cactus.client.HttpClientHelper.around22_connect(HttpClientHel
> pe
> > r.java;org/apache/cactus/util/log/LogAspect.java(1k):1221)
> >         at
> >
> org.apache.cactus.client.HttpClientHelper.connect(HttpClientHelper.java;
> or
> > g/apache/cactus/util/log/LogAspect.java(1k):125)
> >         at
> >
> org.apache.cactus.client.AbstractHttpClient.callRunTest(AbstractHttpClie
> nt
> > .java;org/apache/cactus/util/log/LogAspect.java(1k):188)
> >         at
> >
> org.apache.cactus.client.AbstractHttpClient.dispatch1_doTest(AbstractHtt
> pC
> > lient.java;org/apache/cactus/util/log/LogAspect.java(1k):120)
> >         at
> >
> org.apache.cactus.client.AbstractHttpClient.around1_doTest(AbstractHttpC
> li
> > ent.java;org/apache/cactus/util/log/LogAspect.java(1k):1221)
> >         at
> >
> org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.ja
> va
> > ;org/apache/cactus/util/log/LogAspect.java(1k):115)
> >         at
> >
> org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:
> 45
> > 7)
> >         at
> > org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)
> >         at
> > org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:400)
> >         at
> >
> org.apache.cactus.sample.TestSampleServlet.main(TestSampleServlet.java:9
> 6)
> > 
> > FAILURES!!!
> > Tests run: 13,  Failures: 0,  Errors: 2
> > 
> > 
> > 
> > Thanks
> > 
> > Roger
> > --
> > _______________________________________________
> > Sign-up for your own FREE Personalized E-mail at Mail.com
> > http://www.mail.com/?sr=signup
> > 
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:cactus-user-
> > unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:cactus-user-
> > help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>
> 
> 

-- 
_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


--
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