cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyrille Le Clerc <clecl...@xebia.fr>
Subject Re: unsupported operation exception
Date Mon, 23 Nov 2009 12:04:08 GMT
   Hello Matthew,

   I faced the same problem in my JAX-RS application. I created
CXF-2556 "UnsupportedOperationException in WadlGenerator" and proposed
a patch.

   Unfortunately, I don't see any workaround waiting for the patch. As
our application doesn't really need the WADL generation, we will wait
for the next CXF version.

   Hope this helps,

   Cyrille
--
Cyrille Le Clerc
cleclerc@xebia.fr
http://blog.xebia.fr

On Mon, Nov 23, 2009 at 6:58 AM, Matthew Shaw <Matthew.Shaw@facet.com.au> wrote:
>
> Hi,
>
>
>
> I am getting a UnsupportedOperationException when deploying a jax-rs
> service to jboss as 5. I am using jaxb-2.1 to marshall / unmarshall
> requests. Are there any classpath issues that I should be aware of with
> JBoss? I am running with a spring container.
>
>
>
> Here is the stack trace..
>
>
>
> 15:05:34,014 ERROR [[CXFServlet]] Servlet.service() for servlet
> CXFServlet threw exception
>
> java.lang.RuntimeException: org.apache.cxf.interceptor.Fault
>
>                at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage
> (AbstractFaultChainInitiatorObserver.java:99)
>
>                at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> hain.java:284)
>
>                at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
> onObserver.java:104)
>
>                at
> org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestin
> ation.java:98)
>
>                at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
> vletController.java:392)
>
>                at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
> ler.java:170)
>
>                at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFSe
> rvlet.java:142)
>
>                at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPS
> ervlet.java:50)
>
>                at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>
>                at
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTT
> PServlet.java:101)
>
>                at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:290)
>
>                at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:206)
>
>                at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte
> r.java:96)
>
>                at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:235)
>
>                at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:206)
>
>                at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:235)
>
>                at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:191)
>
>                at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
> sociationValve.java:190)
>
>                at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j
> ava:92)
>
>                at
> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(
> SecurityContextEstablishmentValve.java:126)
>
>                at
> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(S
> ecurityContextEstablishmentValve.java:70)
>
>                at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :127)
>
>                at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :102)
>
>                at
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConn
> ectionValve.java:158)
>
>                at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:109)
>
>                at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:3
> 30)
>
>                at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82
> 9)
>
>                at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
> Http11Protocol.java:598)
>
>                at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>
>                at java.lang.Thread.run(Unknown Source)
>
> Caused by: org.apache.cxf.interceptor.Fault
>
>                at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage
> (AbstractFaultChainInitiatorObserver.java:66)
>
>                ... 29 more
>
> Caused by: java.lang.UnsupportedOperationException
>
>                at java.util.AbstractCollection.add(Unknown Source)
>
>                at java.util.AbstractCollection.addAll(Unknown Source)
>
>                at
> org.apache.cxf.jaxb.JAXBUtils.scanPackages(JAXBUtils.java:777)
>
>                at
> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.createJaxbContext(WadlGene
> rator.java:490)
>
>                at
> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleRequest(WadlGenerato
> r.java:116)
>
>                at
> org.apache.cxf.jaxrs.impl.RequestPreprocessor.checkMetadataRequest(Reque
> stPreprocessor.java:164)
>
>                at
> org.apache.cxf.jaxrs.impl.RequestPreprocessor.preprocess(RequestPreproce
> ssor.java:74)
>
>                at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRS
> InInterceptor.java:87)
>
>                at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSI
> nInterceptor.java:63)
>
>                at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> hain.java:236)
>
>                ... 28 more
>
>
>
>
>
> Here is my beans.xml
>
>
>
> <import resource="classpath:META-INF/cxf/cxf.xml" />
>
>      <import
> resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
>
>      <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>
>
>
>
>
>      <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfi
> gurer">
>
>            <property name="locations">
>
>                  <list>
>
>                        <value>${emi-env.config}</value>
>
>                        <value>${emi.config}</value>
>
>                  </list>
>
>            </property>
>
>            <property name="properties">
>
>                  <props>
>
>                        <prop key="application.name">EMI</prop>
>
>                  </props>
>
>            </property>
>
>            <property name="ignoreUnresolvablePlaceholders"
> value="false" />
>
>      </bean>
>
>
>
>      <jaxrs:server id="dataLoadRSService" address="/dl">
>
>            <jaxrs:serviceBeans>
>
>                  <ref bean="dataLoadService" />
>
>            </jaxrs:serviceBeans>
>
>            <jaxrs:providers>
>
>                  <ref bean="jaxbProvider"/>
>
>            </jaxrs:providers>
>
>      </jaxrs:server>
>
>
>
>      <bean id="jaxbProvider"
> class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
>
>            <property name="schemaHandler" ref="schemaHolder" />
>
>      </bean>
>
>
>
>      <bean id="schemaHolder"
> class="org.apache.cxf.jaxrs.utils.schemas.SchemaHandler">
>
>            <property name="schemas" ref="theSchemas" />
>
>      </bean>
>
>
>
>      <util:list id="theSchemas">
>
>            <value>classpath:/WEB-INF/xsd/peak3.xsd</value>
>
>            <value>classpath:/WEB-INF/xsd/PK3GlobalDataTypes.xsd</value>
>
>      </util:list>
>
>
>
> Any help would be greatly appreciated.
>
>
>
> Cheers,
>
> Matt.
>
>
>

Mime
View raw message