The idea is to get one particular column value from active object table.
@GET
/*@Path("/{vals}")*/
/*@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})*/
public Response getAllValues()
{
List<DiscConf> confs = actConfService.getAllVals();
if(confs!=null)
{
return Response.ok(confs).type(MediaType.APPLICATION_JSON_TYPE).build();
//return Response.ok(new LeangearsRestResourceModel(new GenericEntity<List<DiscConf>>(Lists.newArrayList(confs)))).build();
}
return Response.ok(new LeangearsRestResourceModel("NOT FOUND")).build();
}
But the code leads to:
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Oops - an error has occurred</title><script type="text/javascript">contextPath = "/jira";</script><link type='text/css' rel='stylesheet' href='/jira/static-assets/metal-all.css' media='all'><script src='/jira/static-assets/metal-all.js'></script><!--[if lt IE 9]><link type='text/css' rel='stylesheet' href='/jira/static-assets/metal-all-ie.css' media='all'><script src='/jira/static-assets/metal-all-ie.js'></script><![endif]--><!--[if IE 9]><link type='text/css' rel='stylesheet' href='/jira/static-assets/metal-all-ie9.css' media='all'><![endif]--><meta name="decorator" content="none" /></head><body class=" error-page error500"><script type="text/javascript">document.body.className += " js-enabled";</script><div id="page"><header id="header" role="banner"></header><!-- #header --><section id="content" role="main"><div class="aui-page-panel"><div class="aui-page-panel-inner"><section class="aui-page-panel-content lowerContent"><div id="error-state"><span class="error-type"></span><h1>Sorry, we had some technical problems during your last operation.</h1><h2 class="technical-details-header"><span>Request assistance</span></h2><div id="technical-details-content" class="technical-details js-hidden"><p>Copy the content below and send it to your JIRA Administrator</p><div class="technical-details-content" contentEditable readonly><h2>Technical details</h2><p class="referral">Log's referral number: <strong>b5dbd49c-c32e-4dea-b78d-b90870d833ca</strong></p><div class="info-section" id="causePanel"><h2>Cause</h2><p>Referer URL: <b>http://lp-alok:2990/jira/plugins/servlet/restbrowser</b></p>
org.codehaus.jackson.map.JsonMappingException: No serializer found for class com.sun.proxy.$Proxy3736 and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: java.util.ArrayList[0])
at org.codehaus.jackson.map.ser.impl.UnknownSerializer.failForEmpty(UnknownSerializer.java:52)
at org.codehaus.jackson.map.ser.impl.UnknownSerializer.serialize(UnknownSerializer.java:25)