REST Endpoints in Confluence 3.1.x don't work
Symptoms
The general symptom is that REST endpoints implemented using the REST module type won't work. More specificly features like gadgets or the "Confluence Gadgets" dialog stop working.
Select 'Confluence Gadgets' from the Browse menu, and it gives error:
An error has occurred while trying to load the gadget directory.
Cause
This is caused by the fact that on JDK 1.6 Atlassian Plugins exports the javax.xml.bind (JAXB) packages from the host (Confluence). Those packages are also exported by the REST module plugin. If the a plugin containing a REST module (like the Confluence gadgets plugin) binds to the packages exported by the host, it will not work, as the annotations used to mark a class as a REST resource are loaded from different class loaders.
Workaround
The current workaround is to place a patched jdk6-packages.txt in the WEB-INF/classes directory and restart Confluence.
Resolution
Track a resolution at CONF-17417.