Hello,

sorry that I didn't answered the last half week. On thursday I was working and at the weekend I wasn't at home.

Can anybody tell me how to reprocude this errors? I've never worked with ant before (or I don't know that I've done it :-) ). I've tried to reproduce the messages, buy run the Restlet ant (right click, run as "ant build"), but I can't get the stack traces. I only get the following message:
[...]
   [junit] Running org.restlet.test.RestletTestSuite
   [junit] Tests run: 184, Failures: 0, Errors: 69, Time elapsed: 7,89 sec
BUILD FAILED
[...]

I don't know where this errors occur. Where do you copy the stack trace from?

Will the tests called parallel or one by one? Because I'm starting a Restlet server for every test method with the same port it's clear that it produces problems, if they are called prallel.

If I run's the RestletTestCase, I've get no one of this problems.
But I get some NullPointerExceptions now, when I want to read the metadata (MediaType and so on) from a HEAD request as client. The entity is not available, because there is no response message body. How can I read the MediaType?

best regards
  Stephan

Todd Nguyen schrieb:
got BindingException for 195 times and I still have the same number of exceptions after changing the port to 9999. Before running the test, i ran netstat -an|grep 9999 and no process binding to that port.

On Feb 7, 2008 11:35 AM, Stephan Koops <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Hello Todd,

    do you get this error only twice as shown in the email, or did you get
    it very offen?
    My test cases starts for a lot of test methods a Restlet Server
    and shut
    it down after a test. If the Port 8181 is used by another process,
    this
    Exception is clear.
    You can try to change the constant PORT at the beginning of the class
    org.restlet.test.jaxrs.services.tests.JaxRsTestCase . Let me know,
    what
    happens. Perhaps I should change the server port.

    best regards
       Stephan

    Todd Nguyen schrieb:
    > Got this error when running ant. I presume I should ignore these
    > errors for now.
    >
    > 2008-02-07 08:42:46.753::WARN:  failed
    [EMAIL PROTECTED]:8181
    > java.net.BindException: Address already in use
    >         at sun.nio.ch.Net.bind(Native Method)
    >         at
    >
    sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
    >         at
    > sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
    >         at
    >
    
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:205)
    >         at
    >
    
org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:304)
    >         at
    >
    org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    >         at org.mortbay.jetty.Server.doStart(Server.java:233)
    >         at
    >
    org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    >         at
    >
    
com.noelios.restlet.ext.jetty.JettyServerHelper.start(JettyServerHelper.java:171)
    >         at org.restlet.Server.start(Server.java:345)
    >         at org.restlet.Component.startServers(Component.java:343)
    >         at org.restlet.Component.start(Component.java:306)
    >         at
    >
    
org.restlet.test.jaxrs.services.tests.RestletServerWrapper.startServer(RestletServerWrapper.java:107)
    >         at
    >
    
org.restlet.test.jaxrs.services.tests.JaxRsTestCase.startServer(JaxRsTestCase.java:463)
    >         at
    >
    
org.restlet.test.jaxrs.services.tests.JaxRsTestCase.startServer(JaxRsTestCase.java:438)
    >         at
    >
    
org.restlet.test.jaxrs.services.tests.JaxRsTestCase.setUp(JaxRsTestCase.java:416)
    >         at junit.framework.TestCase.runBare(TestCase.java:132)
    >         at junit.framework.TestResult$1.protect(TestResult.java:110)
    >         at
    junit.framework.TestResult.runProtected(TestResult.java:128)
    >         at junit.framework.TestResult.run(TestResult.java:113)
    >         at junit.framework.TestCase.run(TestCase.java:124)
    >         at junit.framework.TestSuite.runTest(TestSuite.java:232)
    >         at junit.framework.TestSuite.run(TestSuite.java:227)
    >         at junit.framework.TestSuite.runTest(TestSuite.java:232)
    >         at junit.framework.TestSuite.run(TestSuite.java:227)
    >         at junit.framework.TestSuite.runTest(TestSuite.java:232)
    >         at junit.framework.TestSuite.run(TestSuite.java:227)
    >         at junit.framework.TestSuite.runTest(TestSuite.java:232)
    >         at junit.framework.TestSuite.run(TestSuite.java:227)
    >         at
    >
    
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
    >         at
    >
    
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
    >         at
    >
    
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
    > 2008-02-07 08:42:46.754::WARN:  failed
    > [EMAIL PROTECTED]
    > java.net.BindException: Address already in use
    >         at sun.nio.ch.Net.bind(Native Method)
    >         at
    >
    sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
    >         at
    > sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
    >         at
    >
    
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:205)
    >         at
    >
    
org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:304)
    >         at
    >
    org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    >         at org.mortbay.jetty.Server.doStart(Server.java:233)
    >         at
    >
    org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    >         at
    >
    
com.noelios.restlet.ext.jetty.JettyServerHelper.start(JettyServerHelper.java:171)
    >         at org.restlet.Server.start(Server.java:345)
    >         at org.restlet.Component.startServers(Component.java:343)
    >         at org.restlet.Component.start(Component.java:306)
    >


Reply via email to