Skip to content Skip to sidebar Skip to footer

Jira Gadget: Simple Call To REST Resource Doesn't Work

Im trying to write a gadget inside a jira plugin and I've encountered some problems even with a very simple one. Currently I'm trying to get a response from a simple java class i w

Solution 1:

Found the solution: You need to return an Object of an own class with annotations like these:

    @XmlRootElement
public static class HelloClass {
    @XmlElement
    String output;

    HelloClass() {
        output = "Hello";
    }

    HelloClass(String who) {
        output = "Hello " + who;
    }
}

Solution 2:

I had the same problem after I changed my REST API implementation. Firstly I reverted my changes but that worked not (I cannot understand why). Than I added XmlRootElement as suggested here, but it also worked not. Restarting the server, recompiling a clean plugin,... nothing worked.

So in despair I deleted the /target folder and restarted the operating system. And only that worked for me.


Post a Comment for "Jira Gadget: Simple Call To REST Resource Doesn't Work"