jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: Behavior of getRequestURL in ServletTestCase
Date Wed, 19 Feb 2003 18:46:16 GMT
Hi Helen,

1/ WRT the attachement, there seems to be something wrong with jakarta
mailing lists as this is not the first time I'm observing this lately. I
will ask the admin.

2/ The log you have pasted below is the client side log. Unfortunately
it does not contain any server side logs. I believe this is because
you're running the tests using the Cactus ServletTestRunner and thus
your log4j.properties defines both the client side and server side log4j
configuration... The issue is that it point to the *same* log file and
there is an append = false, thus the client side of Cactus erases the
file for each test... The solution is to modify the line:
log4j.appender.cactus.Append=false to log4j.appender.cactus.Append=true.

Make sure you manually delete the file before starting the tests as it
won't be cleared as before. Can you then resend it?

Thanks
-Vincent

> -----Original Message-----
> From: Helen Rehn [mailto:hrehn@us.ibm.com]
> Sent: 19 February 2003 18:53
> To: Cactus Users List
> Subject: RE: Behavior of getRequestURL in ServletTestCase
> 
> 
> 
> 
> 
> I'm not sure what happened to my attachment.  I've pasted the log here
> instead.
> 
> 12:33:12,712 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpClient
> - HttpClient.startSession(String,int,boolean): Host:localhost
Port:9082
> HTTPS:false
> 12:33:12,732 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.HttpConnection
> 12:33:12,732 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.open()
> 12:33:12,742 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.execute(HttpState,HttpConnection)
> 12:33:12,752 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.execute(): looping.
> 12:33:12,752 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.writeRequest(HttpState,HttpConnection)
> 12:33:12,752 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.writeRequestLine(HttpState,HttpConnection)
> 12:33:12,752 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.write(byte[])
> 12:33:12,752 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - >> "GET
>
/test/ServletRedirector?Cactus_TestMethod=testRequestURL&Cactus_TestClas
s=
> RequestURLTest&Cactus_AutomaticSession=true&Cactus_Service=CALL_TEST
>  HTTP/1.1
> "
> 12:33:12,752 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
> 12:33:13,172 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.write(byte[])
> 12:33:13,172 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - >> "Content-type: application/x-www-form-urlencoded
> "
> 12:33:13,172 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.write(byte[])
> 12:33:13,172 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - >> "Host: localhost
> "
> 12:33:13,172 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.write(byte[])
> 12:33:13,172 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - >> "User-Agent: Jakarta HTTP Client/2.0.0a1
> "
> 12:33:13,172 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.writeLine()
> 12:33:13,172 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - >> \r\n
> 12:33:13,182 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.readResponse(HttpState,HttpConnection)
> 12:33:13,182 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.readStatusLine(HttpState,HttpConnection)
> 12:33:13,182 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,523 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "HTTP/1.1 200 OK" [\r\n]
> 12:33:13,523 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.readResponseHeaders(HttpState,HttpConnection)
> 12:33:13,523 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,523 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "Server: WebSphere Application Server/5.0" [\r\n]
> 12:33:13,523 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,523 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "Set-Cookie: JSESSIONID=00000YZTJ0GOBIH4VXBNU2GESUI:-1;Path=/"
[\r\n]
> 12:33:13,523 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,523 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "Cache-Control: no-cache="set-cookie,set-cookie2"" [\r\n]
> 12:33:13,523 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,523 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "Expires: Thu, 01 Dec 1994 16:00:00 GMT" [\r\n]
> 12:33:13,523 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,523 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "Content-Language: en-US" [\r\n]
> 12:33:13,523 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,523 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "Content-Length: 0" [\r\n]
> 12:33:13,523 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,523 [Servlet.Engine.Transports : 1] DEBUG httpclient.Cookie
> - Cookie.parse():  Adding cookie -
> JSESSIONID=00000YZTJ0GOBIH4VXBNU2GESUI:-1; $Path=/
> 12:33:13,523 [Servlet.Engine.Transports : 1] DEBUG methods.GetMethod
> - GetMethod.readResponseBody(HttpState,HttpConnection)
> 12:33:13,523 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.readResponseBody(HttpState,HttpConnection)
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpClient
> - HttpClient.startSession(String,int,boolean): Host:localhost
Port:9082
> HTTPS:false
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.HttpConnection
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.open()
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.execute(HttpState,HttpConnection)
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.execute(): looping.
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.writeRequest(HttpState,HttpConnection)
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.writeRequestLine(HttpState,HttpConnection)
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.write(byte[])
> 12:33:13,533 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - >> "GET /test/ServletRedirector?Cactus_Service=GET_RESULTS HTTP/1.1
> "
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.write(byte[])
> 12:33:13,533 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - >> "Content-type: application/x-www-form-urlencoded
> "
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.write(byte[])
> 12:33:13,533 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - >> "Host: localhost
> "
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.write(byte[])
> 12:33:13,533 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - >> "User-Agent: Jakarta HTTP Client/2.0.0a1
> "
> 12:33:13,533 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.writeLine()
> 12:33:13,533 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - >> \r\n
> 12:33:13,543 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.readResponse(HttpState,HttpConnection)
> 12:33:13,543 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.readStatusLine(HttpState,HttpConnection)
> 12:33:13,543 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,543 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "HTTP/1.1 200 OK" [\r\n]
> 12:33:13,543 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.readResponseHeaders(HttpState,HttpConnection)
> 12:33:13,543 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,543 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "Server: WebSphere Application Server/5.0" [\r\n]
> 12:33:13,543 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,543 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "Content-Language: en-US" [\r\n]
> 12:33:13,543 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,543 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "Transfer-Encoding: chunked" [\r\n]
> 12:33:13,543 [Servlet.Engine.Transports : 1] DEBUG
> httpclient.HttpConnection       - HttpConnection.readLine()
> 12:33:13,543 [Servlet.Engine.Transports : 1] DEBUG methods.GetMethod
> - GetMethod.readResponseBody(HttpState,HttpConnection)
> 12:33:13,543 [Servlet.Engine.Transports : 1] DEBUG
httpclient.HttpMethod
> - HttpMethodBase.readResponseBody(HttpState,HttpConnection)
> 12:33:13,543 [Servlet.Engine.Transports : 1] INFO  httpclient.wire
> - << "<webresult><exception
>
classname="junit.framework.AssertionFailedError"><message><![CDATA[reque
st
> .getRequestURL()
>  was
>
http://localhost:80/testnullnull]]></message><stacktrace><![CDATA[junit.
fr
> amework.AssertionFailedError:
>  request.getRequestURL() was http://localhost:80/testnullnull
>       at junit.framework.Assert.fail(Assert.java:51)
>       at RequestURLTest.testRequestURL(RequestURLTest.java:24)
>       at java.lang.reflect.Method.invoke(Native Method)
>       at
>
org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestCase.java:3
32
> )
>       at
>
org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.ja
va
> :235)
>       at
>
org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCal
le
> r.java:149)
>       at
>
org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequ
es
> t(LogAspect.aj(1k):125)
>       at
>
org.apache.cactus.server.AbstractWebTestController.around87_handleReques
t(
> LogAspect.aj(1k):1156)
>       at
>
org.apache.cactus.server.AbstractWebTestController.handleRequest(LogAspe
ct
> .aj(1k):101)
>       at
>
org.apache.cactus.server.ServletTestRedirector.dispatch113_doPost(LogAsp
ec
> t.aj(1k):123)
>       at
>
org.apache.cactus.server.ServletTestRedirector.around113_doPost(LogAspec
t.
> aj(1k):1156)
>       at
>
org.apache.cactus.server.ServletTestRedirector.doPost(LogAspect.aj(1k):1
09
> )
>       at
>
org.apache.cactus.server.ServletTestRedirector.dispatch112_doGet(LogAspe
ct
> .aj(1k):96)
>       at
>
org.apache.cactus.server.ServletTestRedirector.around112_doGet(LogAspect
.a
> j(1k):1156)
>       at
>
org.apache.cactus.server.ServletTestRedirector.doGet(LogAspect.aj(1k):92
)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>       at
>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe
rv
> letInstance.java:110)
>       at
>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi
fe
> cycleServlet.java:174)
>       at
>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle
Se
> rvlet.java:313)
>       at
>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif
ec
> ycleServlet.java:116)
>       at
>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.
ja
> va:258)
>       at
>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali
dS
> ervletReferenceState.java:42)
>       at
>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle
tI
> nstanceReference.java:40)
>       at
>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tc
> h(WebAppRequestDispatcher.java:872)
>       at
>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
qu
> estDispatcher.java:491)
>       at
>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
ue
> stDispatcher.java:173)
>       at
>
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:7
9)
>       at
>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
ok
> er.java:199)
>       at
>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on
> (CachedInvocation.java:71)
>       at
>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tR
> equestProcessor.java:182)
>       at
>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
te
> ner.java:331)
>       at
>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.j
> ava:56)
>       at
>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
43
> 2)
>       at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
>       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
> ]]></stacktrace></exception></webresult>"
> 
> Nell Rehn
> WebSphere Advanced Design and Technology
> hrehn@us.ibm.com
> (919) 254-1088 t/l 444-1088
> 
> 
> 
>                       Helen
>                       Rehn/Durham/IBM@I        To:       "Cactus Users
> List" <cactus-user@jakarta.apache.org>
>                       BMUS                     cc:
>                                                Subject:  RE: Behavior
of
> getRequestURL in ServletTestCase
>                       02/19/2003 12:42
>                       PM
>                       Please respond to
>                       "Cactus Users
>                       List"
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Hi,
> 
> I do actually have 1.4.1, I was wrong about that.
> 
> I've attached the server-side log.  The test I ran simply checked the
> request.getRequestURL to see if it contained "9082" and failed if it
did
> not.
> 
> (See attached file: CACTUS~1.LOG)
> 
> Nell Rehn
> WebSphere Advanced Design and Technology
> hrehn@us.ibm.com
> (919) 254-1088 t/l 444-1088
> 
> 
> 
>                       "Vincent Massol"
> 
>                       <vmassol@octo.com        To:       "'Cactus
Users
> List'" <cactus-user@jakarta.apache.org>
>                       >                        cc:       Helen
> Rehn/Durham/IBM@IBMUS
>                                                Subject:  RE: Behavior
of
> getRequestURL in ServletTestCase
>                       02/19/2003 08:51
> 
>                       AM
> 
>                       Please respond to
> 
>                       "Cactus Users
> 
>                       List"
> 
> 
> 
> 
> 
> 
> 
> Hi Helen,
> 
> One thing that you should do is use Cactus 1.4.1 as it contains
several
> bug fixes from 1.4.
> 
> Then, you should enable cactus logging (see the configuration howto on
> the cactus web site for how to perform this) and send us the generated
> log files.
> 
> Thanks
> -Vincent
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



Mime
View raw message