Hi All,
I am trying to write a simple address book app using jersey. My
application right now is a simple resource class that supports only
GET and returns an array of hardcoded Address objects. An Address
object is a very simple object with just 2 methods returning Strings
(getHouse() and getStreet()). On executing a GET I see the error
below. Please can someone point out where I am going wrong?
java.lang.IllegalArgumentException: A entity provider for type, class
[Laddressbook.resources.Address;, is not supported
at com.sun.ws.rest.impl.provider.ProviderFactoryImpl.createEntityProvider(ProviderFactoryImpl.java:67)
at com.sun.ws.rest.impl.container.httpserver.HttpServerResponseAdaptor.commit(HttpServerResponseAdaptor.java:66)
at com.sun.ws.rest.impl.container.httpserver.HttpHandlerContainer.handle(HttpHandlerContainer.java:64)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:65)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:68)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:556)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:528)
at sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:125)
at sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:353)
at sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:327)
at java.lang.Thread.run(Thread.java:619)
thanks,
:aditya