More information about my investigation available in the original issue thread :
http://mail-archives.apache.org/mod_mbox/wink-user/201301.mbox/%3ccalvhuexfobnx-cxswleaumydsnbu3osh3_pvot55bychl54...@mail.gmail.com%3E Thanks On Tue, Mar 26, 2013 at 10:03 AM, Luciano Resende <[email protected]> wrote: > I'm more then happy to apply a patch for WINK-379 and cut a new > release ASAP. But I will most likely only have time to investigate the > issue over the weekend. > > On Tue, Mar 26, 2013 at 9:38 AM, Reto Bachmann-Gmür <[email protected]> wrote: >> The issue WINK-379 is I think the major blocker preventing us to release >> clerezza platform with wink. For example the sparql endpoint isn't working >> because of this issue. The sparql endoint jaxrs resource method returns an >> object that can be a graph, a resultset or a Boolean. Currently it only >> works when the client sets the accept header to prefer the right format, >> i.e. for a construct query one has to prefer rdf over xml and for a select >> query xml over rdf. If they prefer application/rdf+xml over application/xml >> and the query results in a ResultSet this will results in the following >> error. >> >> The system could not find a javax.ws.rs.ext.MessageBodyWriter or a >> DataSourceProvider class for the javax.xml.transform.dom.DOMSource type and >> application/rdf+xml mediaType. Ensure that a >> javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the >> type and media type specified. >> >> Currently because of this some clerezza modules are working better in >> Stanbol than in clerezza. Stanbol is using jersey. The part of clerezza >> tied to wink is TypeRendering however with jax-rs 2.0 typerendering can be >> implemented in a portable way thanks to >> http://java.net/jira/browse/JAX_RS_SPEC-23 being resolved. Jax-rs 2.0 is >> currently implemented in jersey 2 release candidate and in a RestEasy 3 >> beta. I haven't tried any of them. >> >> WDYT? >> >> Reto >> >> ---------- Forwarded message ---------- >> From: Reto Bachmann-Gmür <[email protected]> >> Date: Sun, Mar 17, 2013 at 6:41 PM >> Subject: Re: 500 - Response and Error unless restricting accept header >> To: [email protected] >> Cc: [email protected] >> >> >> Hi Luciano >> >> The error occurs when the resource method has no @Produces (or >> @Produces(*/*) ) and there is no MessageBodyWriter for the first preference >> in the Accept header. >> >> Cheers, >> Reto >> >> >> On Sun, Mar 17, 2013 at 6:18 PM, Luciano Resende <[email protected]>wrote: >> >>> On Sun, Jan 13, 2013 at 10:34 AM, Reto Bachmann-Gmür <[email protected]> >>> wrote: >>> > Hello >>> > >>> > When the accept header is set to >>> > >>> > Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 >>> > >>> > I get a 500 reponse and the following errr is logged. >>> > >>> > 2013-01-13 19:27:25,639 [931211918@qtp-341460182-40] ERROR >>> > 931211918@qtp-341460182-40 >>> > org.apache.wink.server.internal.handlers.FlushResultHandler - The system >>> > could not find a javax.ws.rs.ext.MessageBodyWriter or a >>> DataSourceProvider >>> > class for the >>> org.apache.clerezza.rdf.core.impl.util.PrivilegedGraphWrapper >>> > type and text/html mediaType. Ensure that a >>> > javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for >>> the >>> > type and media type specified. >>> > >>> > When I restrict the accept header to a format for which there is a >>> > MessageBodyWriter things works correctly. >>> > >>> > Is this a known problem or should I investigate further and create an >>> issue? >>> > >>> > Cheers, >>> > Reto >>> >>> I was trying to reproduce the error with the trunk code, I created a >>> simple resource that @produces application/xml and then used a browser >>> rest client to submit a request passing the accept header you >>> mentioned and it worked ok. Could you double check with trunk code and >>> maybe provide more details on how I could reproduce the issue. >>> >>> -- >>> Luciano Resende >>> http://people.apache.org/~lresende >>> http://twitter.com/lresende1975 >>> http://lresende.blogspot.com/ >>> > > > -- Luciano Resende http://people.apache.org/~lresende http://twitter.com/lresende1975 http://lresende.blogspot.com/
