jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Zhang <sean.zh...@verizon.com>
Subject RE: Error returned while running the Sample
Date Fri, 11 Jan 2002 21:53:19 GMT
I also checked <cactus
home>/sample/target/test/tomcat40/webapps/test/Web-inf/web.xml and the
servlet mapping ends with "/"  
(<url-pattern>/ServletRedirector/</url-pattern>)  So I believe that the
settings are all correct.  Why the Exception is still thrown by the test?

So I go into the source and disabled the test and now ant builds correctly.
But I still want to know if I can build without disable the test. 

Thanks,

Sean

		-----Original Message-----
		From:	Sean Zhang [mailto:Sean.Zhang@ins.gte.com]
		Sent:	Friday, January 11, 2002 3:20 PM
		To:	Cactus Users List
		Subject:	RE: Error returned while running the Sample

		I see. But I checked the <cactus
home>/sample/conf/test/cactus.properties
		file and the setting for servlet redirector is ended with
"/". 
		(cactus.servletRedirectorURL =
http://localhost:8080/test/ServletRedirector/
		<http://localhost:8080/test/ServletRedirector/> )  

		I'm using cactus 1.2.  Why do I still get the Exception?

				-----Original Message-----
				From:	Vincent Massol
[mailto:vmassol@octo.com]
				Sent:	Friday, January 11, 2002 1:42 PM
				To:	'Cactus Users List'
				Subject:	RE: Error returned while
running the Sample

				Sean,

				This is bit complex to explain but it means
everything ran
		fine ! Ok
				here's the story :
				- HttpURLConnection in JDK 1.3.0 and older
versions have
		some bugs (or
				limitations). If you want to be able to
check status code
		without
				HttpURLConnection to throw an exception, you
need to end the
				ServletRedirector mapping by '/' (see docs
on the web site :
		check the
				configuration guide). However be careful
that this only
		works for Cactus
				1.2 and does not for Cactus 1.3 (actually I
have disabled
		this test in
				Cactus 1.3 until I find a solution or move
to HttpClient for
		HTTP
				connections).

				-Vincent

				> -----Original Message-----
				> From: Sean Zhang
[mailto:sean.zhang@verizon.com]
				> Sent: 10 January 2002 16:35
				> To: Cactus Mailing List (E-mail)
				> Subject: Error returned while running the
Sample
				> 
				> I followed the Sample Howto to run the
sample and I
		received an
				Exception
				> in
				> the middle of running it.  Screen output
is attached
		below.  (the
				error
				> message is highlighted)  Can some one help
me to figure
		out what
				should be
				> down to correct this?
				> 
				> Thanks,
				> 
				> Sean
				> 
				> D:\cactus\sample\build>ant tests_all
				> Buildfile: build.xml
				> 
				> init:
				>      [echo] --------- Cactus Sample 1.2
---------
				>      [echo]
				>      [echo] java.class.path =
				>
			
	
d:\jdk1.3.1_01\lib\tools.jar;d:\ant141\lib\xerces.jar;d:\ant141\lib\xala
				n.
				> ja
				>
			
	
r;d:\ant141\lib\junit.jar;d:\ant141\lib\jaxp.jar;d:\ant141\lib\jakarta-a
				nt
				> -1.4.1-
				>
	
optional.jar;d:\ant141\lib\crimson.jar;d:\ant141\lib\ant.jar;d:\Cactu
				> s
				>
			
	
Test\cactus.properties;d:\cactus\lib\junit.jar;d:\cactus\lib\cactus.jar;
				d:
				> \c
				> actus\httpclient.jar;d:\xs
				>
			
	
p\com\verizon\vol\esp\log4j\log4j.jar;d:\xsp\com\verizon\vol\esp\log4j\e
				sp
				> -l
				>
			
	
og4jx.jar;d:\j2ee\lib\j2ee.jar;d:\javaclasses;d:\jbuilder5\extras\xerces
				\x
				> er
				> ces.jar;d:\bea\wl61\lib\webl
				>
ogic.jar;d:\vss\esp;d:\jbuilder5\lib\servlet.jar;d:\java
				>      [echo]
				>      [echo] java.home = d:\jdk1.3.1_01\jre
				>      [echo] user.home =
C:\WINNT\Profiles\XZhang
				>      [echo]
				>      [echo] basedir = D:\cactus\sample
				>      [echo]
				>      [echo] cactus.jar = ../lib/cactus.jar
				>      [echo] cactus.ant.jar =
../lib/cactus-ant.jar
				>      [echo] servlet.jar =
d:/jbuilder5/lib/servlet.jar
				>      [echo] junit.jar = ../lib/junit.jar
				>      [echo] httpclient.jar =
../lib/httpclient.jar
				> 
				> prepare:
				>     [mkdir] Created dir:
D:\cactus\sample\target\src
				>      [copy] Copying 25 files to
		D:\cactus\sample\target\src
				> 
				> prepare-compile:
				>     [mkdir] Created dir:
D:\cactus\sample\target\classes
				> 
				> compile:
				>     [javac] Compiling 25 source files to
				D:\cactus\sample\target\classes
				>     [javac] Note: Some input files use or
override a
		deprecated API.
				>     [javac] Note: Recompile with
-deprecation for details.
				>      [copy] Copying 1 file to
		D:\cactus\sample\target\classes
				> 
				> prepare-testwar-log4j:
				>      [copy] Copying 1 file to
D:\cactus\sample\target\lib
				> 
				> prepare-testwar:
				>      [copy] Copying 1 file to
D:\cactus\sample\target\lib
				>      [copy] Copying 1 file to
D:\cactus\sample\target\lib
				>      [copy] Copying 1 file to
D:\cactus\sample\target\lib
				>     [mkdir] Created dir:
D:\cactus\sample\target\test
				> 
				> testwar:
				>       [war] Building war:
		D:\cactus\sample\target\test\test.war
				> 
				> check_tests_resin_20:
				>      [echo]
				>      [echo]
		*********************************************************
				>      [echo] WARNING : The 'resin.home.20'
property has not
		been set.
				>      [echo]           No test will be run
on that servlet
		engine.
				>      [echo]
		*********************************************************
				>      [echo]
				> 
				> prepare_tests_resin_20:
				> 
				> tests_resin_20:
				> 
				> check_tests_resin_13:
				>      [echo]
				>      [echo]
		*********************************************************
				>      [echo] WARNING : The 'resin.home.13'
property has not
		been set.
				>      [echo]           No test will be run
on that servlet
		engine.
				>      [echo]
		*********************************************************
				>      [echo]
				> 
				> prepare_tests_resin_13:
				> 
				> tests_resin_13:
				> 
				> check_tests_tomcat_40:
				> 
				> prepare_tests_tomcat_40:
				>      [echo] tomcat.home.40 =
d:/jakarta-tomcat-4.0
				>     [mkdir] Created dir:
		D:\cactus\sample\target\test\tomcat40\conf
				>     [mkdir] Created dir:
		D:\cactus\sample\target\test\tomcat40\work
				>     [mkdir] Created dir:
		D:\cactus\sample\target\test\tomcat40\webapps
				>      [copy] Copying 1 file to
				D:\cactus\sample\target\test\tomcat40\conf
				>      [copy] Copying 1 file to
				D:\cactus\sample\target\test\tomcat40\conf
				>      [copy] Copying 1 file to
				>
D:\cactus\sample\target\test\tomcat40\webapps
				> 
				> tests_tomcat_40:
				> 
				> start_tomcat_40:
				>      [java] HttpConnector Opening server
socket on all
		host IP
				addresses
				>      [java] Starting service
Tomcat-Standalone
				>      [java] Apache Tomcat/4.0.1
				>      [java] StandardHost[localhost]:
Installing web
		application at
				context
				> path /test from URL
				>
	
jar:file:D:\cactus\sample\target\test\tomcat40\webapps\test.war!/
				>      [java] WebappLoader[/test]: Deploying
class
		repositories to work
				> directory
D:\jakarta-tomcat-4.0\work\localhost\test
				>      [java] WebappLoader[/test]: Deploy
JAR
		/WEB-INF/lib/cactus.jar to
				>
			
	
D:\cactus\sample\target\test\tomcat40\webapps\test\WEB-INF\lib\cactus.ja
				r
				>      [java] WebappLoader[/test]: Deploy
JAR
				/WEB-INF/lib/httpclient.jar to
				>
D:\cactus\sample\target\test\tomcat40\webapps\test\WEB-
				> INF\lib\httpclient.ja
				> r
				>      [java] WebappLoader[/test]: Deploy
JAR
		/WEB-INF/lib/junit.jar to
				>
			
	
D:\cactus\sample\target\test\tomcat40\webapps\test\WEB-INF\lib\junit.jar
				>      [java] WebappLoader[/test]: Deploy
JAR
		/WEB-INF/lib/log4j.jar to
				>
			
	
D:\cactus\sample\target\test\tomcat40\webapps\test\WEB-INF\lib\log4j.jar
				>      [java] StandardManager[/test]:
Seeding random number
		generator
				class
				> java.security.SecureRandom
				>      [java] StandardManager[/test]:
Seeding of random
		number generator
				has
				> been completed
				>      [java] ContextConfig[/test]: Added
certificates ->
		request
				attribute
				> Valve
				>      [java]
StandardWrapper[/test:default]: Loading
		container servlet
				> default
				>      [java]
StandardWrapper[/test:invoker]: Loading
		container servlet
				> invoker
				>      [java] HttpConnector[8080] Starting
background thread
				> 
				> tests:
				>     [junit] Running
org.apache.cactus.TestAll
				>     [junit] Tests run: 41, Failures: 0,
Errors: 1, Time
		elapsed: 10
				sec
				>     [junit] Testsuite:
org.apache.cactus.TestAll
				>     [junit] Tests run: 41, Failures: 0,
Errors: 1, Time
		elapsed: 10
				sec
				>     [junit]
				>     [junit] Testcase: testLongProcess took
3.546 sec
				>     [junit] Testcase: testLotsOfData took
2.437 sec
				>     [junit] Testcase:
testReadServletOutputStream took
		0.188 sec
				>     [junit] Testcase: testPostMethod took
0.015 sec
				>     [junit] Testcase: testGetMethod took
0.032 sec
				>     [junit] Testcase: testSetAttribute
took 0.031 sec
				>     [junit] Testcase:
testSetRequestAttribute took 0.031
		sec
				>     [junit] Testcase: testSendParams took
0.016 sec
				>     [junit] Testcase: testSendHeader took
0.031 sec
				>     [junit] Testcase: testSendCookie took
0.062 sec
				>     [junit] Testcase:
testSendMultipleCookies took 0.032
		sec
				>     [junit] Testcase: testReceiveHeader
took 0.015 sec
				>     [junit] Testcase: testReceiveCookie
took 0.032 sec
				>     [junit] Testcase:
testRequestDispatcher took 1.828 sec
				>     [junit] Testcase: testServletConfig
took 0.062 sec
				>     [junit] Testcase: testAddHeaderParamOK
took 0.063 sec
				>     [junit] Testcase:
testAddHeaderParamNotDefined took
		0.047 sec
				>     [junit] Testcase: testAddFooterParamOK
took 0.015 sec
				>     [junit] Testcase:
testAddFooterParamNotDefined took
		0.031 sec
				>     [junit] Testcase: testDoFilterOK took
0.047 sec
				>     [junit] Testcase: testDoStartTag took
0.672 sec
				>     [junit] Testcase:
testDoStartTagInclude took 0.188 sec
				>     [junit] Testcase: testDoEndTagContinue
took 0.031 sec
				>     [junit] Testcase: testDoEndTagStop
took 0.031 sec
				>     [junit] Testcase: testReplacement took
0.047 sec
				>     [junit] Testcase:
testAssertionFailedError took 0.078
		sec
				>     [junit] Testcase:
testExceptionNotSerializable took
		0.031 sec
				>     [junit] Testcase:
testExceptionSerializable took 0.016
		sec
				>     [junit] Testcase:
testNoAutomaticSessionCreation took
		0.047 sec
				>     [junit] Testcase:
testMultiValueParameters took 0.031
		sec
				>     [junit] Testcase:
testWriteOutputStream took 0.031 sec
				>     [junit] Testcase:
testSetConfigParameter took 0.016
		sec
				>     [junit] Testcase: testGetServletName
took 0.016 sec
				>     [junit] Testcase:
testSendMultivaluedHeader took 0.031
		sec
				>     [junit] Testcase:
testGetResponseAsStringMultiLines
		took 0.031 sec
				>     [junit] Testcase:
		testGetResponseAsStringArrayMultiLines took
				0.016
				> sec
				>     [junit] Testcase: testCookieEncoding
took 0.015 sec
				>     [junit] Testcase:
testGetRequestDispatcherFromRequest1
		took 0.032
				sec
				>     [junit] Testcase:
testGetRequestDispatcherFromRequest2
		took 0.015
				sec
				>     [junit] Testcase: testGetLogs took
0.016 sec
				>     [junit] Testcase: testStatusCode took
0.016 sec
				>     [junit]     Caused an ERROR
				>     [junit] Server returned HTTP response
code: 401 for
		URL:
				>
http://localhost:8080/test/ServletRedirector/
				>     [junit] java.io.IOException: Server
returned HTTP
		response code:
				401
				> for
				> URL:
http://localhost:8080/test/ServletRedirector/
				>     [junit]     at
				>
			
	
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec
				ti
				> on
				> .java:564)
				>     [junit]     at
				>
			
	
org.apache.cactus.client.AutoReadHttpURLConnection.getInputStream(AutoRe
				ad
				> Ht
				> tpURLConnection.java:127)
				>     [junit]     at
				>
			
	
org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.ja
				va
				> :1
				> 36)
				>     [junit]     at
				>
			
	
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:
				42
				> 2)
				>     [junit]     at
				>
	
org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:130)
				>     [junit]     at
				>
	
org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:371)
				>     [junit]     at
				>
junit.framework.TestResult$1.protect(TestResult.java:106)
				>     [junit]     at
				>
		junit.framework.TestResult.runProtected(TestResult.java:124)
				>     [junit]     at
		junit.framework.TestResult.run(TestResult.java:109)
				>     [junit]     at
		junit.framework.TestCase.run(TestCase.java:131)
				>     [junit]     at
	
junit.framework.TestSuite.runTest(TestSuite.java:173)
				>     [junit]     at
		junit.framework.TestSuite.run(TestSuite.java:168)
				>     [junit]     at
	
junit.framework.TestSuite.runTest(TestSuite.java:173)
				>     [junit]     at
		junit.framework.TestSuite.run(TestSuite.java:168)
				>     [junit]     at
				>
			
	
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTe
				st
				> Ru
				> nner.java:231)
				>     [junit]     at
				>
			
	
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitT
				es
				> tR
				> unner.java:409)
				>     [junit]
				> 
				> stop_tomcat_40:
				>      [java] Stopping service
Tomcat-Standalone
				>      [java] HttpConnector[8080] Stopping
background thread
				>      [java] StandardHost[localhost]:
Removing web
		application at
				context
				> path /test
				> [runservertests] Server stopped !
				> 
				> BUILD FAILED
				> 
				> D:\cactus\sample\build\build.xml:376: Test
		org.apache.cactus.TestAll
				> failed
				> 
				> Total time: 43 seconds
				> 
				> --
				> 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>

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


Mime
View raw message