Sam,
I can see only 3 solutions :
1/ Your have changed some Tomcat configuration file (where you installed
Tomcat), maybe a long time ago and it's causing this problem
or
2/ After you unzipped Jakarta-cactus-23-1.2.zip, you have changed
something other than build.properties, like web.xml found in
sample/conf/test
or
3/ Tomcat 4.0.3 does not work with Cactus 1.2 (I have never tested it
with Tomcat 4.0.x).
So here's what I propose : can you download the newest Cactus 1.3
(released last Sunday) and try with it ? Do exactly as you've done :
download the distrib + unzip + go into sample-servlet/build, create and
edit a build.properties file and type "ant test.all"
Note: The sample application build file does not work with Ant 1.4.1 (it
wasn't intentional but made it in the release). Simply comment out or
remove the line that says :
<fail message="Missing property or property pointing to an
invalid file (check your build.properties file)"
unless="properties.ok"/>
as it is only supported with Ant 1.5. Alternatively you can download and
use the prepackaged Ant that is available on the cactus web site.
Cheers,
-Vincent
> -----Original Message-----
> From: Sam Joseph [mailto:[EMAIL PROTECTED]]
> Sent: 23 April 2002 04:37
> To: Vincent Massol; cactus
> Subject: Re: Problem with ServletInit and testSetAttribute in
> tests_tomcat_40
>
> Hi Vincent
>
> Vincent Massol wrote:
>
> >Sam,
> >
> >Let's start again from the beginning ignoring everything we said in
our
> >previous email.
> >
> Sounds like a good idea.
>
> > The sample application is really very simple to get
> >started with.
> >
> So I've heard :-)
>
> >Let's start with some questions :
> >
> >1/ Do you have Ant installed ?
> >
> I do, version 1.4.1
>
> >Have you downloaded the prepackaged Ant
> >install from the Cactus web site ?
> >
> I have downloaded it, but I haven't unpacked or used it.
>
> >2/ Have you downloaded Tomcat and unzipped it in a directory ? (no
need
> >to configure anything at all) ?
> >
> A long time ago. I'm using tomcat 4.0.3
>
> >3/ What have you downloaded from Cactus web site (exact name of file)
?
> >
> jakarta-cactus-23-1.2.zip
>
> >4/ Have you unzipped it in a directory, let's say [CACTUS] ?
> >
> yes
>
> >5/ Have you created a [CACTUS]/build/build.properties (by copying and
> >editing [CACTUS]/build/build.properties.sample ?
> >
> yes
>
> >If answer to 3/ is yes, then you have finished. The only thing to do
is
> >to open a dos prompt, cd to [CACTUS]/build and type "ant tests_all"
> >
> right, that's what I did and I got the error that I originally sent
you
> in my first email:
>
> "its almost working but I get an error during start_tomcat_40"
>
> [java] StandardContext[/test]: Servlet /test has thrown a load()
> exception: javax.servlet.ServletException: Servlet jsp'sServlet.init()
> has thrown an exception
> [java] javax.servlet.ServletException: Servlet jsp's
Servlet.init()
> has thrown asn exception
> [java] at
>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:
> 935)
>
> [java] at
>
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808)
> [java] at
>
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
av
> a:3266)
>
> [java] at
>
org.apache.catalina.core.StandardContext.start(StandardContext.java:3395
)
> [java] at
>
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
> [java] ..........................
>
> "the tests then start and they go okay, but testSetAttribute gives an
> error"
>
> tests:
> [junit] Running org.apache.cactus.TestAll
> [junit] Tests run: 6, Failures: 0, Errors: 1, Time elapsed: 6.559
sec
> [junit] Testsuite: org.apache.cactus.TestAll
> [junit] Tests run: 6, Failures: 0, Errors: 1, Time elapsed: 6.559
sec
> [junit]
> [junit] Testcase: testLongProcess took 3.805 sec
> [junit] Testcase: testLotsOfData took 2.494 sec
> [junit] Testcase: testReadServletOutputStream took 0.15 sec
> [junit] Testcase: testPostMethod took 0.03 sec
> [junit] Testcase: testGetMethod took 0.03 sec
> [junit] Testcase: testSetAttribute took 0.04 sec
> [junit] Caused an ERROR
> [junit] null
> [junit] java.lang.NoSuchMethodError
> [junit] at
>
org.apache.catalina.session.StandardSession.setAttribute(StandardSession
.j
> ava:1185)
>
> [junit] at
>
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardS
es
> sionFacade.java:191)
>
> [junit] at
>
org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardS
es
> sionFacade.java:191)
>
> [junit] at
>
org.apache.cactus.sample.SampleServlet.setSessionVariable(SampleServlet.
ja
> va:119)
>
> [junit] at
>
org.apache.cactus.sample.TestSampleServlet.testSetAttribute(TestSampleSe
rv
> let.java:174)
>
> [junit] at java.lang.reflect.Method.invoke(Native Method)
> [junit] at
>
org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestCase.java:4
91
> )
> [junit] at
>
org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.ja
va
> :456)
>
> [junit] at
>
org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller.ja
va
> :137)
>
> [junit] at
>
org.apache.cactus.server.AbstractTestController.handleRequest(AbstractTe
st
> Controller.java:122)
>
> [junit] at
>
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirec
to
> r.java:134)
>
> [junit] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> [junit] .................
>
>
> "And then tomcat shuts down without any other tests being run."
>
> Any help will be greatly appreciated.
>
> CHEERS> SAM
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>