Hm, AFAIK there might be only one javax.ws.rs.core.Application subclass per webapp.
That's what I thought too at first, but this is not actually the case. You can have multiple application subclasses as long as they register disjoint sets of resources (or you have one or more applications explicitly registering resources plus one catch-all application that doesn't explicitly register anything and so defaults to all other resources). The spec is not particularly clear about this, but there are hints of it. E.g. in section 4.1 "By default a single instance of each provider class is instantiated for each JAX-RS application" (emphasis mine) implies that multiple applications are supported.
It would be great if you could share the generated uberjar so that we could reproduce the issue.
I'll try to put together something simpler, for a number of reasons: not supposed to post internal code publicly, too large and complex etc. Thanks a lot for looking into it though. |