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 Charles Massey <CM...@corp.classmates.com> on 2002/09/04 00:29:14 UTC

RE: NullPointerException at org.apache.cactus.server.AbstractWebT estC aller.doGetResults(AbstractWebTestCaller.java:196)

Hi Shriniwas,

I'm using Dynamo - so I can probably help you here.  We're still using
Cactus 1.3, and I haven't tried running Cactus 1.4 on Dynamo yet.

To start, you mention below that you are not following the web.xml and .war
format.  Does this mean that you are not declaring your <servlet>
definitions in the web.xml file?  I have found that using the "Cactus
Configuration" guide has helped a lot (
http://jakarta.apache.org/cactus/howto_config.html ).  It is true that
Dynamo uses .dar files to package files, but you may still need to declare
the ServletRedirector and/or JspRedirector in your web.xml if you intend to
use them.

Looking at the following section in your stack trace, what does
servlet_redirector.jsp do?  It looks like it is throwing a
NullPointerException in this code also (or from the servlet) ?

[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] INFO  httpclient.wire
- << "<HEAD><TITLE>500 Internal Server Error</TITLE></HEAD>
<H1>500 Internal Server Error</H1><BODY>
The servlet invoked by the requested URL //en_US/servlet_redirector.jsp
raised the exception:<br><br>java.lang.NullPointerException<P>
</BODY>
" 
14:50:29,946
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG httpclient.HttpMethod
- HttpMethodBase.execute(): closing connection since we're using HTTP/1.0 
14:50:29,947


To help you further I need more information.  I have been able to integrate
Cactus 1.3 into Dynamo 5.6.1 by using the ServletRedirector redirector and
subclassing ServletTestCase for my tests.

Charley



-----Original Message-----
From: Wagle, Shriniwas [mailto:swagle@verisign.com]
Sent: Tuesday, September 03, 2002 12:36 PM
To: 'cactus-user@jakarta.apache.org'
Subject: NullPointerException at
org.apache.cactus.server.AbstractWebTestC
aller.doGetResults(AbstractWebTestCaller.java:196)


I've recently started working with Cactus and after trying to make it work
over the last couple of days, I'm feeling rather stuck.  So any help would
be appreciated.  I apologize for the rather long traces.  I hope they are of
some help.

Environment :
	jakarta-cactus-12-1.4
	Dynamo Application Server 5.1 on SunOS 5.8
	jdk 1.2

Our applications do not follow web.xml and .war format but use proprietary
ATG Dynamo mechanism of integrating with the Dynamo application server.

I've been trying to map the Tomcat Quickstart steps to Dynamo.  Below is the
stack trace from the Dynamo Server when I get the NullPointerException.

**** Error      Tue Sep 03 14:50:29 EDT 2002    1031079029740
/atg/dynamo/server/HttpServer   ---     java.lang.NullPointerException
**** Error      Tue Sep 03 14:50:29 EDT 2002    1031079029740
/atg/dynamo/server/HttpServer           at
org.apache.cactus.server.AbstractWebTestCaller.doGetResults(AbstractWebTestC
aller.java:196)
**** Error      Tue Sep 03 14:50:29 EDT 2002    1031079029740
/atg/dynamo/server/HttpServer           at
org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequest(
LogAspect.aj(1k):131)
**** Error      Tue Sep 03 14:50:29 EDT 2002    1031079029740
/atg/dynamo/server/HttpServer           at
org.apache.cactus.server.AbstractWebTestController.around87_handleRequest(Lo
gAspect.aj(1k):1156)
**** Error      Tue Sep 03 14:50:29 EDT 2002    1031079029740
/atg/dynamo/server/HttpServer           at
org.apache.cactus.server.AbstractWebTestController.handleRequest(LogAspect.a
j(1k):101)
**** Error      Tue Sep 03 14:50:29 EDT 2002    1031079029740
/atg/dynamo/server/HttpServer           at
org.apache.cactus.server.ServletTestRedirector.dispatch113_doPost(LogAspect.
aj(1k):123)
**** Error      Tue Sep 03 14:50:29 EDT 2002    1031079029740
/atg/dynamo/server/HttpServer           at
org.apache.cactus.server.ServletTestRedirector.around113_doPost(LogAspect.aj
(1k):1156)
**** Error      Tue Sep 03 14:50:29 EDT 2002    1031079029740
/atg/dynamo/server/HttpServer           at
org.apache.cactus.server.ServletTestRedirector.doPost(LogAspect.aj(1k):109)
**** Error      Tue Sep 03 14:50:29 EDT 2002    1031079029740
/atg/dynamo/server/HttpServer           at
org.apache.cactus.server.ServletTestRedirector.dispatch112_doGet(LogAspect.a
j(1k):96)
**** Error      Tue Sep 03 14:50:29 EDT 2002    1031079029740
/atg/dynamo/server/HttpServer           at
org.apache.cactus.server.ServletTestRedirector.around112_doGet(LogAspect.aj(
1k):1156)


Below is the partial stack trace from cactus_client.log :

14:50:29,293
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG httpclient.HttpMethod
- HttpMethodBase.readResponse(HttpState,HttpConnection) 
14:50:29,293
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG httpclient.HttpMethod
- HttpMethodBase.readStatusLine(HttpState,HttpConnection) 
14:50:29,294
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG
httpclient.HttpConnection       - HttpConnection.readLine() 
14:50:29,934
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] INFO  httpclient.wire
- << "HTTP/1.0 500 Internal Server Error" [\r\n] 
14:50:29,934
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG httpclient.HttpMethod
- HttpMethodBase.readResponseHeaders(HttpState,HttpConnection) 
14:50:29,935
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG
httpclient.HttpConnection       - HttpConnection.readLine() 
14:50:29,936
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] INFO  httpclient.wire
- << "Server: atg.server.http.HttpServer" [\r\n] 
14:50:29,937
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG
httpclient.HttpConnection       - HttpConnection.readLine() 
14:50:29,939
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] INFO  httpclient.wire
- << "Set-Cookie: JSESSIONID=QTJRKOQKOLLJUCULHTOCFEQ;path=/" [\r\n] 
14:50:29,939
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG
httpclient.HttpConnection       - HttpConnection.readLine() 
14:50:29,941
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] INFO  httpclient.wire
- << "Content-Type: text/html" [\r\n] 
14:50:29,941
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG
httpclient.HttpConnection       - HttpConnection.readLine() 
14:50:29,943
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG httpclient.Cookie
- Cookie.parse():  Adding cookie - JSESSIONID=QTJRKOQKOLLJUCULHTOCFEQ;
$Path=/ 
14:50:29,943
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG methods.GetMethod
- GetMethod.readResponseBody(HttpState,HttpConnection) 
14:50:29,944
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG httpclient.HttpMethod
- HttpMethodBase.readResponseBody(HttpState,HttpConnection) 
14:50:29,945
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] INFO  httpclient.wire
- << "<HEAD><TITLE>500 Internal Server Error</TITLE></HEAD>
<H1>500 Internal Server Error</H1><BODY>
The servlet invoked by the requested URL //en_US/servlet_redirector.jsp
raised the exception:<br><br>java.lang.NullPointerException<P>
</BODY>
" 
14:50:29,946
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG httpclient.HttpMethod
- HttpMethodBase.execute(): closing connection since we're using HTTP/1.0 
14:50:29,947
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG
httpclient.HttpConnection       - HttpConnection.close() 
14:50:29,948
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG
httpclient.HttpConnection       - HttpConnection.closeSocketAndStreams() 
14:50:29,994
[/atg/dynamo/server/HttpServer-0:ipaddr=10.136.42.72;path=/en_US/servlet_tes
t_runner.jsp;sessionid=4QWWRQKZKB12UCULHTOCFEQ] DEBUG
controller.TestSampleServlet    - Exception in test 
org.apache.cactus.util.ChainedRuntimeException: Failed to get the test
results. This is probably due to an error that happened on the server side
when trying to execute the tests. Here is what was returned by the server :
[
 */ %>





]
	at
org.apache.cactus.client.AbstractHttpClient.dispatch2_doTest(LogAspect.aj(1k
):120)
	at
org.apache.cactus.client.AbstractHttpClient.around2_doTest(LogAspect.aj(1k):
1236)
	at
org.apache.cactus.client.AbstractHttpClient.doTest(LogAspect.aj(1k):104)
	at
org.apache.cactus.AbstractWebTestCase.runGenericTest(AbstractWebTestCase.jav
a:260)
	at
org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)

Thank you,
Raj Wagle

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>