[
https://issues.apache.org/jira/browse/CXF-5385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13823484#comment-13823484
]
Grzegorz Grzybek commented on CXF-5385:
---------------------------------------
I wonder why 2.7.3 works and 2.7.4 not - these both version use
{{javax.ws.rs-api-2.0-m10.jar}} as JAX-RS API.
However I've tested your scenario and encountered two problems:
JAX-RS conflict:
{noformat}
java.lang.NoSuchMethodError:
javax/ws/rs/NotFoundException.validate(Ljavax/ws/rs/core/Response;Ljavax/ws/rs/core/Response$Status;)Ljavax/ws/rs/core/Response;
{noformat}
Commons XmlSchema conflict:
{noformat}
java.lang.NoSuchMethodError:
org/apache/ws/commons/schema/XmlSchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/String;)Lorg/apache/ws/commons/schema/XmlSchema;
{noformat}
That's because the above classes are provided by WebSphere 8.5 (regardless of
setting the _parent-last_ class loader):
* {{WAS_HOME/plugins/javax.j2ee.jaxrs.jar}}
* {{WAS_HOME/plugins/org.apache.axis2.jar}}
respectively.
What has worked for me is this:
# console → Environment → Shared Libraries - I've created the shared library
called "JAX-RS" with two JARS:
#* {{M2_REPO}}/javax/ws/rs/javax.ws.rs-api/2.0-m10/javax.ws.rs-api-2.0-m10.jar
#*
{{M2_REPO}}/org/apache/ws/xmlschema/xmlschema-core/2.0.3/xmlschema-core-2.0.3.jar
# Check the "Use an isolated class loader for this shared library" option
# console → Applications → WebSphere enterprise applications → _your
application_ → Shared library references - I've checked the WAR module, clicked
_Reference Shared Libraries_ and added the "JAX-RS" library to the WAR module.
# restart WebSphere (you can't do much in WAS without restarting...)
And everything works!
regards
Grzegorz Grzybek
> CXF 2.7.7 on Websphere 8.5.0 is not able to generate WADL.
> ----------------------------------------------------------
>
> Key: CXF-5385
> URL: https://issues.apache.org/jira/browse/CXF-5385
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.7.7
> Environment: Websphere 8.5.0, IDE: RAD 8.5.5
> Reporter: Vishal Balana
> Labels: patch
> Fix For: 2.7.7
>
> Original Estimate: 96h
> Remaining Estimate: 96h
>
> Following exception occurs while trying to get the WADL out of HelloWorld app
> deployed on Wehbsphere 8.5.0.
> When I tried with CXF 2.7.3, it worked Fine! 2.7.4, 2.7.5, 2.7.6 and 2.7.7
> all spits the following exception.
> com.ibm.ws.webcontainer.servlet.ServletWrapper service Uncaught service()
> exception thrown by servlet appServlet: java.lang.NoSuchMethodError:
> javax/ws/rs/core/Response.getHeaders()Ljavax/ws/rs/core/MultivaluedMap;
> at
> org.apache.cxf.jaxrs.utils.JAXRSUtils.setMessageContentType(JAXRSUtils.java:1587)
> at
> org.apache.cxf.jaxrs.JAXRSInvoker.checkExchangeForResponse(JAXRSInvoker.java:281)
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:82)
> at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
> at
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)
> at
> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:167)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
> at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
--
This message was sent by Atlassian JIRA
(v6.1#6144)