Hi @Sergey, thanks for your answer... see some follow ups inline
Regards LF On Mon, Jul 11, 2016 at 1:00 PM, Sergey Beryozkin <[email protected]> wrote: > Hi > > Please see comments inline > On 10/07/16 16:03, Lars-Fredrik Smedberg wrote: > >> Hi! >> >> To be able to expose different root resources for different paths I have >> defined my REST servlet (com.ibm.websphere.jaxrs.server.IBMRestServlet, >> running WLP 8.5.5.9 which to my understanding uses CXF) multiple times >> with >> different servlet-mappings. >> >> I tried to specify the same jaxax.ws.rs.Application class for both servlet >> mappings (it works out internally what root resources to expose) using an >> init-parameter: >> >> <init-param> >> <param-name>javax.ws.rs.Application</param-name> >> <param-value><FQCN></param-value> >> </init-param> >> >> I tried to define my REST servlet two times using different mappings but >> with the same init-parameter for the Application class. >> >> When I do this I get the following FFDC log when calling resources on one >> of the mappings but not the other. >> >> com.ibm.ws.webcontainer.webapp.WebAppErrorReport: >> javax.servlet.UnavailableException: SRVE0200E: Servlet >> [com.ibm.websphere.jaxrs.server.IBMRestServlet]: Could not find required >> class - com.ibm.websphere.jaxrs.server.IBMRestServlet >> >> When using two different Application subclasses I do not get this error. >> >> Questions: >> >> - Is this something IBM or CXF related? >> > > when you have Application registered like this then as far as I know its > @ApplicationPath, it it exists, is ignored in favor of the servlet URL > pattern, so I think it may be an IBM issue, because if you have two > servlets with diff URL patterns referring to the same Application then it > should work just fine. > > I'm not using the @ApplicationPath annotation but rather map each servlet to an url in the web.xml > The fact that one of servlets is not visible implies that @ApplicationPath > is not ignored, and is used as some kind of a key, and it causes the issues. > > - Is it suppose to work with the same Application subclass for multiple >> defined REST servlets? Workarounds if not? >> > > IMHO it should work. Try the existing workaround (with two subclasses) for > now > > Cheers, Sergey > > >> Regards >> Lars-Fredrik >> >> > > -- > Sergey Beryozkin > > Talend Community Coders > http://coders.talend.com/ > -- Med vänlig hälsning / Best regards Lars-Fredrik Smedberg STATEMENT OF CONFIDENTIALITY: The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the address(es) and may contain confidential or privileged information. If you are not the intended recipient, please notify Lars-Fredrik Smedberg immediately at [email protected], and destroy all copies of this message and any attachments.
