Forum Stats

  • 3,727,354 Users
  • 2,245,375 Discussions
  • 7,852,753 Comments

Discussions

How to convert array of oracle.jbo.Row to json object

Hi

I am trying to convert the result of a adf View Object to json format

@Path("/user")public class UserResource {    public UserResource() {    }    @GET    @Produces(MediaType.APPLICATION_JSON)    public Row[] getUsers() {        Row[] rows = null;        ADFContext oldContext = ADFContext.initADFContext(null, null, null, null);        try {            String amDef = "com.tarek.api.model.app.AppModule";            String config = "AppModuleLocal";            ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);            ViewObject vo = am.findViewObject("AllUsers");            vo.executeQuery();            rows = vo.getAllRowsInRange();            Configuration.releaseRootApplicationModule(am, true);        } finally {            ADFContext.resetADFContext(oldContext);        }        return rows;    }

But i get this error

MessageBodyWriter not found for media type=application/json, type=class [Loracle.jbo.Row;, genericType=class [Loracle.jbo.Row;.

I am using  Jdeveloper IDE 12.2

and integrated weblogic

Any suggestions

Sign In or Register to comment.