Hello Petar

I have used Jetty 6.1.7 which did not work.
Now, I try it with Jetty 5.1.14 and it works. That's fine for me.

Regards

Rene


Petar Tahchiev wrote:
Hi Rene,

can you please tell us what is the version of Jetty you are using?
And can you try downgrading to, lets say Jetty 5?


2008/1/4, Rene Döring <[EMAIL PROTECTED]>:
Hello

I'm using Cactus for the first time, so I have some difficulties to get
it working. I want to test some servlets, therefore I'm using the Jetty
integration.

I try to run Cactus with Ant and my task looks something like this:
    <target name="run-tests" depends="compile-tests">
        <junit fork="yes" haltonfailure="yes" haltonerror="yes"
printsummary="yes"
           showoutput="true">

            <jvmarg value="-Dcactus.contextURL=http://localhost:8989/test
"/>

            <classpath>
                <pathelement location="/home/.../lib/jetty-6.1.6rc0.jar"/>
                <pathelement
location="/home/.../lib/jetty-util-6.1.6rc0.jar"/>
                <pathelement location="/home/.../servlet.jar"/>
                [...]
            </classpath>
            <classpath path="build/test-class"/>

            <batchtest todir="${test.log.dir}" >
                <fileset refid="test.classes.files" />
            </batchtest>
            <formatter type="plain" usefile="false" />
            <formatter type="xml" />

        </junit>
  </target>


The only class which should be tested is the following:

public class TestJettyAll extends TestCase
{
    public static Test suite()
    {
        TestSuite suite = new TestSuite();
        suite.addTestSuite(TestSLabel.class);

        return new JettyTestSetup(suite);
    }
}


And the TestSLabel class looks as follows (only to test whether it works
or not):

public class TestSLabel extends TestCase{
    public void testSButton(){
        int i=5;
        assertEquals(i,5);
    }
}


And now my problem. When I run the ant target, I receive the following
output:

Testcase: unknown took 0 sec
Caused an ERROR
org.mortbay.jetty.Server.addListener(java.lang.String)
java.lang.NoSuchMethodException:
org.mortbay.jetty.Server.addListener(java.lang.String)
at java.lang.Class.getMethod(Class.java:1605)
at
org.apache.cactus.extension.jetty.JettyTestSetup.createServer(
JettyTestSetup.java:361)
at
org.apache.cactus.extension.jetty.JettyTestSetup.setUp(JettyTestSetup.java
:209)
at
org.apache.cactus.extension.jetty.JettyTestSetup$1.protect(
JettyTestSetup.java:165)
at
org.apache.cactus.extension.jetty.JettyTestSetup.run_aroundBody0(
JettyTestSetup.java:174)
at
org.apache.cactus.extension.jetty.JettyTestSetup.run_aroundBody1$advice(
JettyTestSetup.java:224)
at org.apache.cactus.extension.jetty.JettyTestSetup.run(
JettyTestSetup.java)

What is the problem? The org.mortbay.jetty.Server class is in the
classpath. I have no idea how I can solve the problem :-(
Is there anyone how can help me?

Thanks

Rene


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to