On Thu, May 16, 2013 at 11:36 AM, sanjeev <[email protected]> wrote:
> Hello,
> I am getting the following error. Any way to get rid of this.
>
> SEVERE: The system could not find a javax.ws.rs.ext.MessageBodyWriter or a
> DataSourceProvider class for the
> org.apache.wink.common.internal.ResponseImpl$ResponseBuilderImpl type and
> application/xml mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter
> exists in the JAX-RS application for the type and media type specified.
> Mai 16, 2013 5:25:08 PM org.apache.wink.server.internal.RequestProcessor
> logException
> INFO: The following error occurred during the invocation of the handlers
> chain: WebApplicationException (500 - Internal Server Error) with message
> 'null' while processing GET request sent to
> http://localhost:8080/LockUnlock/rest/lock
>
>
> --- Resource class--
> @Path("")
> public class LockUnlock {
>
>         public static final String ID = "LockUnlock:1";
>
>         @Path("lock")
>         @GET
>         @Produces(MediaType.APPLICATION_XML)
>
>         public ResponseBuilder lock() {
>
>                 System.out.println("creating Lock");
>                 /**
>                  * For debug we print the header information
>                  */
>                 for (String header : 
> requestHeaders.getRequestHeaders().keySet()) {
>                         System.out.println(header);
>                 }
>
>                 System.out.println("Lock created");
>
>                 ResponseBuilder builder = Response.ok(); //new 
> ResponseBuilderImpl();
>                 return builder.status(200);
>
>         }
>
> Thankyou
> Sanjeev
>
>
>
> --
> View this message in context: 
> http://apache-wink-users.3471013.n2.nabble.com/The-system-could-not-find-a-javax-ws-rs-ext-MessageBodyWriter-or-a-DataSourceProvider-tp7572682.html
> Sent from the Apache Wink Users mailing list archive at Nabble.com.

Could you please try modifying you lock operation to return a
Response, and then on the return, do builder.build()...


--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Reply via email to