import com.atlassian.plugins.rest.common.security.AnonymousAllowed;
import org.apache.wink.json4j.JSONObject;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@Path("/message")
public class MyRestResource
{
@AnonymousAllowed
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public Response getMessage() {
JSONObject response = new JSONObject();
return Response.ok(new MyRestResourceModel("Hello")).build();
}
}
When we are initiating the "JSONObject" defined in package "org.apache.wink.json4j.JSONObject" in our custom jira server plugin, plugin crashes and gives the below attached error.
Jira details are followings
<jira.version>7.13.0</jira.version>
<amps.version>8.0.2</amps.version>