jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Plante <dpla...@pacbell.net>
Subject help! running struts unit tests
Date Wed, 05 Jun 2002 23:16:58 GMT
I'm trying to get the unit test target going (test.all), and I am
running into all sorts of problems.
Has anyone seen the ServletException being thrown (something to do with
AspectJ)  I've included the output of running 'ant test.all'

I have had to patch a number of files to get this far, and I'd be glad
to share what I've done once it's working.

I'm using today's nightly build from struts, and the release of cactus
for J2ee 1.2 - version 1.3.

All help appreciated!

Dom


Buildfile: build.xml

init:
     [echo] --------- jakarta-struts 1.1-b1 ---------
     [echo] 
     [echo] java.class.path =
c:\J2SDK_Forte\jdk1.4.0\lib\tools.jar;c:\jakarta-ant\lib\xmlParserAPIs.j
ar;c:\jakarta-ant\lib\xml-apis.jar;c:\jakarta-ant\lib\xercesImpl.jar;c:\
jakarta-ant\lib\xalan.jar;c:\jakarta-ant\lib\stylebook-1.0-b3_xalan-2.ja
r;c:\jakarta-ant\lib\optional.jar;c:\jakarta-ant\lib\junit.jar;c:\jakart
a-ant\lib\jaxp.jar;c:\jakarta-ant\lib\checkstyle.jar;c:\jakarta-ant\lib\
aspectjtools.jar;c:\jakarta-ant\lib\aspectjrt.jar;c:\jakarta-ant\lib\asp
ectj-ant.jar;c:\jakarta-ant\lib\antlr.jar;c:\jakarta-ant\lib\ant.jar;.;C
:\J2SDK_Forte\jdk1.4.0\lib\tools.jar;c:\jb244_tc401\jboss\client\jboss-j
2ee.jar;c:\jakarta-ant-1.4.1\lib\ant.jar;c:\Tomcat40\common\lib\servlet.
jar;c:\blazix11\blazix.jar;c:\mm.mysql-2.0.8\mm.mysql-2.0.8-bin.jar;c:\j
unit3.7\junit.jar;C:\xt-20020426a-src\xt.jar;c:\jaxp1-1\jaxp.jar;c:\jaxp
1-1\crimson.jar;c:\jaxp1-1\xerces.jar;
     [echo] java.home = c:\J2SDK_Forte\jdk1.4.0\jre
     [echo] user.home = C:\Documents and Settings\default

prepare.library:

compile.library:
    [style] Transforming into C:\jakarta-struts-20020605\target\library

check.tests.tomcat.32:
     [echo] 
     [echo] *********************************************************
     [echo] WARNING : The 'tomcat.home.32' property has not been set.
     [echo]           No test will be run on that servlet engine.
     [echo] *********************************************************
     [echo] 

test.tomcat.32:

check.tests.tomcat.40:

test.tomcat.40:
     [echo] tomcat.home.40 = c:/tc404b3

init:

prepare.test:

compile.test:

prepare.test.war:

prepare.test.tomcat.40:
   [delete] Deleting directory
C:\jakarta-struts-20020605\target\test\servers\tomcat40\webapps\test

test.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.4-b3
     [java] StandardHost[localhost]: Installing web application at
context path /test from URL
jar:file:C:\jakarta-struts-20020605\target\test\servers\tomcat40\webapps
\test.war!/
     [java] WebappLoader[/test]: Deploying class repositories to work
directory C:\TC404b3\work\Standalone\localhost\test
     [java] WebappLoader[/test]: Deploy JAR /WEB-INF/lib/cactus.jar to
C:\jakarta-struts-20020605\target\test\servers\tomcat40\webapps\test\WEB
-INF\lib\cactus.jar
     [java] WebappLoader[/test]: Deploy JAR /WEB-INF/lib/junit.jar to
C:\jakarta-struts-20020605\target\test\servers\tomcat40\webapps\test\WEB
-INF\lib\junit.jar
     [java] WebappLoader[/test]: Deploy JAR /WEB-INF/lib/struts.jar to
C:\jakarta-struts-20020605\target\test\servers\tomcat40\webapps\test\WEB
-INF\lib\struts.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

run.test:
    [junit] Running org.apache.struts.taglib.logic.TestEqualTag
     [java] StandardWrapperValve[JspRedirector]: Servlet.service() for
servlet JspRedirector threw exception
     [java] javax.servlet.ServletException: org/aspectj/lang/Signature
     [java] javax.servlet.ServletException: org/aspectj/lang/Signature
     [java] 	at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:471)
     [java] 	at
org.apache.jsp.jspRedirector$jsp._jspService(jspRedirector$jsp.java:96)
     [java] 	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
     [java] 	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     [java] 	at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.java:201)
     [java] 	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
     [java] 	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
     [java] 	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     [java] 	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
     [java] 	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
     [java] 	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
     [java] 	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
     [java] 	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
     [java] 	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     [java] 	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:190)
     [java] 	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
     [java] 	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
     [java] 	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
     [java] 	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
     [java] 	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     [java] 	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234
7)
     [java] 	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
     [java] 	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
     [java] 	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
     [java] 	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
     [java] 	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:170)
     [java] 	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
     [java] 	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.083
sec
    [junit] Testsuite: org.apache.struts.taglib.logic.TestEqualTag
     [java] 	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.083
sec
    [junit] 
    [junit] Testcase: testStringEquals took 2.053 sec
    [junit] 	Caused an ERROR
     [java] 	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
     [java] 	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
     [java] 	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
     [java] 	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    [junit] Server returned HTTP response code: 500 for URL:
http://localhost:8080/test/JspRedirector?Cactus_TestMethod=testStringEqu
als&Cactus_TestClass=org.apache.struts.taglib.logic.TestEqualTag&Cactus_
AutomaticSession=true&Cactus_Service=CALL_TEST
     [java] 	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.j
ava:1027)
     [java] 	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:
1125)
     [java] 	at java.lang.Thread.run(Thread.java:536)
    [junit] java.io.IOException: Server returned HTTP response code: 500
for URL:
http://localhost:8080/test/JspRedirector?Cactus_TestMethod=testStringEqu
als&Cactus_TestClass=org.apache.struts.taglib.logic.TestEqualTag&Cactus_
AutomaticSession=true&Cactus_Service=CALL_TEST
    [junit] 	at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec
tion.java:691)
    [junit] 	at
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnec
tion.java:1116)
    [junit] 	at
java.net.URLConnection.getHeaderFieldInt(URLConnection.java:475)
    [junit] 	at
java.net.URLConnection.getContentLength(URLConnection.java:370)
    [junit] 	at
org.apache.cactus.client.HttpClientHelper.dispatch22_connect(HttpClientH
elper.java;org/apache/cactus/util/log/LogAspect.java(1k):176)
    [junit] 	at
org.apache.cactus.client.HttpClientHelper.around22_connect(HttpClientHel
per.java;org/apache/cactus/util/log/LogAspect.java(1k):1221)
    [junit] 	at
org.apache.cactus.client.HttpClientHelper.connect(HttpClientHelper.java;
org/apache/cactus/util/log/LogAspect.java(1k):125)
    [junit] 	at
org.apache.cactus.client.AbstractHttpClient.callRunTest(AbstractHttpClie
nt.java;org/apache/cactus/util/log/LogAspect.java(1k):188)
    [junit] 	at
org.apache.cactus.client.AbstractHttpClient.dispatch1_doTest(AbstractHtt
pClient.java;org/apache/cactus/util/log/LogAspect.java(1k):120)
    [junit] 	at
org.apache.cactus.client.AbstractHttpClient.around1_doTest(AbstractHttpC
lient.java;org/apache/cactus/util/log/LogAspect.java(1k):1221)
    [junit] 	at
org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.ja
va;org/apache/cactus/util/log/LogAspect.java(1k):115)
    [junit] 	at
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:
457)
    [junit] 	at
org.apache.cactus.JspTestCase.runTest(JspTestCase.java:113)
    [junit] 	at
org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:400)
    [junit] 
    [junit] Testcase: testStringEquals

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
C:\jakarta-struts-20020605\build-tests.xml:198: Test
org.apache.struts.taglib.logic.TestEqualTag failed

Total time: 15 seconds


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