cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-2556) UnsupportedOperationException in WadlGenerator
Date Wed, 25 Nov 2009 18:00:40 GMT

     [ https://issues.apache.org/jira/browse/CXF-2556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Beryozkin updated CXF-2556:
----------------------------------

    Component/s: JAX-RS

> UnsupportedOperationException in WadlGenerator
> ----------------------------------------------
>
>                 Key: CXF-2556
>                 URL: https://issues.apache.org/jira/browse/CXF-2556
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.5
>            Reporter: Cyrille Le Clerc
>             Fix For: 2.2.6, 2.3
>
>         Attachments: CXF-2556.patch
>
>
> UnsupportedOperationException when displaying the WADL.
> STACKTRACE
> ===========
> java.lang.UnsupportedOperationException
> 	java.util.AbstractCollection.add(AbstractCollection.java:221)
> 	java.util.AbstractCollection.addAll(AbstractCollection.java:305)
> 	org.apache.cxf.jaxb.JAXBUtils.scanPackages(JAXBUtils.java:811)
> 	org.apache.cxf.jaxrs.model.wadl.WadlGenerator.createJaxbContext(WadlGenerator.java:498)
> 	org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleRequest(WadlGenerator.java:123)
> 	org.apache.cxf.jaxrs.impl.RequestPreprocessor.checkMetadataRequest(RequestPreprocessor.java:164)
> 	org.apache.cxf.jaxrs.impl.RequestPreprocessor.preprocess(RequestPreprocessor.java:74)
> 	org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:87)
> 	org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:63)
> 	org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
> 	org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:109)
> 	org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:98)
> 	org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:394)
> 	org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:170)
> 	org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:142)
> 	org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
> 	org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:108)
> CAUSE
> ======
> public class WadlGenerator implements RequestHandler {
>     
>     public Response handleRequest(Message m, ClassResourceInfo resource) {
>          ...
>         Set<Class<?>> jaxbTypes = ResourceUtils.getAllRequestResponseTypes(cris,
true).keySet(); <=== RETURNED SET IS READ ONLY !
>         JAXBContext context = createJaxbContext(jaxbTypes);   <=== createJaxbContext()
WIIL TRY TO ADD ENTRIES IN THE GIVEN SET
>     }
> PROPOSED FIX
> =============
> * in createJaxbContext(), create a HashSet() initialized with the initial jaxbTypes
> * add javadoc on JAXBUtils.scanPackages(classes, objectFactoryCache) to explain the given
classes Set will be modified

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message