Hi Jerome,

Jerome Louvel wrote:

1. Even with a clean download of the SVN trunk at the moment (without my patch), I can't get it to pass all the tests (in 'verify-tests'). I've tried to build the latest code and test it on a Mac (10.5 and Java 5) and on a Linux (Java 6), but there's always one test in org.restlet.test.RestletTestSuite that fails. I've tried to turn verbose on in the junit ant-task, but to be honest, I'm quite confused in all the messages that come up. I tend to use jUnit directly from Eclipse usually, and in the ant output, the junit messages seem to be lost between other logging messages. Is it just me?

Could you check your "build\temp\test" directory? You will see some log
messages and probably the failing unit test.


I was assuming that it was the same test failing on the Linux box and on the Mac, but I was wrong.

- In TEST-org.restlet.test.RestletTestSuite.txt, on a Linux machine (Debian), using Sun JDK 1.6.0:

Testcase: testGetList took 0.178 sec
        Caused an ERROR
JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/home/bruno/restlet-svn/libraries/javax.xml.bind_2.1/com.sun.jaxb.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/) java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/home/bruno/restlet-svn/libraries/javax.xml.bind_2.1/com.sun.jaxb.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/) at com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:136) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:406) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:270) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:103) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:81) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:152)
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
at org.restlet.ext.jaxb.JaxbRepresentation.getContext(JaxbRepresentation.java:307) at org.restlet.ext.jaxb.JaxbRepresentation.access$000(JaxbRepresentation.java:59) at org.restlet.ext.jaxb.JaxbRepresentation$Unmarshaller$1.initialValue(JaxbRepresentation.java:187) at org.restlet.ext.jaxb.JaxbRepresentation$Unmarshaller$1.initialValue(JaxbRepresentation.java:182)
        at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:141)
        at java.lang.ThreadLocal.get(ThreadLocal.java:131)
at org.restlet.ext.jaxb.JaxbRepresentation$Unmarshaller.getUnmarshaller(JaxbRepresentation.java:210)

at org.restlet.ext.jaxb.JaxbRepresentation$Unmarshaller.unmarshal(JaxbRepresentation.java:247) at org.restlet.ext.jaxb.JaxbRepresentation.getObject(JaxbRepresentation.java:532) at org.restlet.test.jaxrs.services.tests.PersonsTest.testGetList(PersonsTest.java:63)

Testcase: testCreate took 0.01 sec
        FAILED
expected:<Created (201)> but was:<Internal Server Error (500)>
junit.framework.AssertionFailedError: expected:<Created (201)> but was:<Internal Server Error (500)> at org.restlet.test.jaxrs.services.tests.PersonsTest.testCreate(PersonsTest.java:74)


My guess is that it's picking up JAXB 2.0 which, I think, is in Java 6, in rt.jar (on the bootstrap classpath). This link might help: https://jaxb.dev.java.net/guide/Migrating_JAXB_2_0_applications_to_JavaSE_6.html#Using_JAXB_2_1_with_JavaSE_6




- In TEST-org.restlet.test.RestletTestSuite.txt, on a Mac (OSX Leopard 10.5.2, Apple Java 1.5.0_13:

Testcase: testXmlTransformGet took 0.017 sec
        FAILED
expected:<OK (200)> but was:<Internal Server Error (500)>
junit.framework.AssertionFailedError: expected:<OK (200)> but was:<Internal Server Error (500)> at org.restlet.test.jaxrs.services.tests.ProviderTest.testXmlTransformGet(ProviderTest.java:276)



- For completeness, I've also tried with Sun Java 1.5.0_14 on the same Linux box as above, and I get the same error as with Apple Java 5 on the Mac.




2. As part of the test units, is there anything that tests HTTPS (as opposed to HTTP)? I couldn't find anything, so I tried to I started to work on a com.noelios.restlet.test.SslBaseConnectorsTestCase based on com.noelios.restlet.test.BaseConnectorsTestCase (using a dummy 'localhost' certificate). This raised many more questions, but I'll start a new thread. (Some of it has to do with http://restlet.tigris.org/issues/show_bug.cgi?id=281 since it's a similar topic)

OK. Your SslBaseConnectorsTestCase sounds like a good idea. We should
definitely automate HTTPS testing as well.

OK. I've already started on this. I've also created a dummy CA and certificate for 'localhost' for testing.



Grizzly needs a bit more testing: some other problems came up because it tends to close the connection abruptly after a timeout (in a similar way as it was doing with 1.1M1 and plain HTTP). (An HTTPS test unit would help.)

Ok, this is interesting. We have a bug report pending for Grizzly, feel free
to add comments to it:
http://restlet.tigris.org/issues/show_bug.cgi?id=341

OK. I'll try to produce a simple example. I think such an example might depend on SslBaseConnectorsTestCase, which in turns depends on what I mentioned in the thread 'SSL and KeyStores' (posted yesterday night); in particular, it depends on the embedded clients being able to trust the (dummy) server certificate.



Best regards,

Bruno.


Reply via email to