Re: Problem to run a Cactus test using Jetty integration

2008-01-07 Thread Rene Döring

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]



Re: Problem to run a Cactus test using Jetty integration

2008-01-07 Thread Petar Tahchiev
Hi Rene,

It seems that the versions of Jetty = 6 there is a gap in the
API. Some of the methods that were in the Server class are now
missing. And apparently one of them is addListener. Those methods
were not deprecated, so I assume that they are just no longer supported.
I am not sure if the Jetty integration will be available with the future
versions of the Cactus project.

2008/1/7, Rene Döring [EMAIL PROTECTED]:

 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]




-- 
Regards, Petar!
Karlovo, Bulgaria.

EOOXML Objections
http://www.grokdoc.net/index.php/EOOXML_objections

Public PGP Key at:
https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611


Re: Problem to run a Cactus test using Jetty integration

2008-01-04 Thread Petar Tahchiev
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]




-- 
Regards, Petar!
Karlovo, Bulgaria.

EOOXML Objections
http://www.grokdoc.net/index.php/EOOXML_objections

Public PGP Key at:
https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611