cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Chomat (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-3110) jaxrs: ParameterizedTypeImpl cannot be cast to java.lang.Class
Date Thu, 18 Nov 2010 13:57:14 GMT

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

Stephane Chomat updated CXF-3110:
---------------------------------

    Attachment: testxmladapter.zip

it's an example.
I tried it with this configuration:

karaf@client1> list -u
START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Spring    Level  Update location
[  31] [Active     ] [Created     ] [       ] [   60] mvn:org.apache.karaf.shell/org.apache.karaf.shell.config/2.1.0
[  75] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_4
[  76] [Active     ] [            ] [       ] [   60] mvn:org.springframework/spring-core/3.0.5.RELEASE
[  77] [Active     ] [            ] [       ] [   60] mvn:org.springframework/spring-asm/3.0.5.RELEASE
[  78] [Active     ] [            ] [       ] [   60] mvn:org.springframework/spring-expression/3.0.5.RELEASE
[  79] [Active     ] [            ] [       ] [   60] mvn:org.springframework/spring-beans/3.0.5.RELEASE
[  80] [Active     ] [            ] [       ] [   60] mvn:org.springframework/spring-aop/3.0.5.RELEASE
[  81] [Active     ] [            ] [       ] [   60] mvn:org.springframework/spring-context/3.0.5.RELEASE
[  82] [Active     ] [            ] [       ] [   60] mvn:org.springframework/spring-context-support/3.0.5.RELEASE
[  83] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/2.1_3_6
[  84] [Active     ] [            ] [       ] [   60] mvn:org.springframework.osgi/spring-osgi-io/1.2.1
[  85] [Active     ] [            ] [       ] [   60] mvn:org.springframework.osgi/spring-osgi-core/1.2.1
[  86] [Active     ] [            ] [       ] [   60] mvn:org.springframework.osgi/spring-osgi-extender/1.2.1
[  87] [Active     ] [            ] [       ] [   60] mvn:org.springframework.osgi/spring-osgi-annotation/1.2.1
[  88] [Active     ] [Created     ] [       ] [   60] mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.spring/2.1.1
[  89] [Active     ] [            ] [       ] [   60] mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/0.2-incubating
[  90] [Active     ] [            ] [       ] [   60] mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
[  91] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/1.5.0
[  92] [Active     ] [            ] [       ] [   60] mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1
[  93] [Active     ] [            ] [       ] [   60] mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0
[  94] [Active     ] [            ] [       ] [   60] mvn:org.apache.geronimo.specs/geronimo-ws-metadata_2.0_spec/1.1.2
[  95] [Active     ] [            ] [       ] [   60] mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1
[  96] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.saaj-api-1.3/1.5.0
[  97] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.1/1.5.0
[  98] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.1/1.5.0
[  99] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/1.5.0
[ 100] [Active     ] [            ] [       ] [   60] mvn:javax.mail/mail/1.4.3
[ 101] [Active     ] [            ] [       ] [   60] mvn:org.springframework/spring-jms/3.0.5.RELEASE
[ 102] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.asm/2.2.3_3
[ 103] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.fastinfoset/1.2.7_2
[ 104] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.1.12_1
[ 105] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jetty-bundle/6.1.22_1-fuse
[ 106] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.neethi/2.0.4_2
[ 107] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.saaj-impl/1.3.2_1
[ 108] [Active     ] [            ] [       ] [   60] mvn:org.codehaus.woodstox/stax2-api/3.0.2
[ 109] [Active     ] [            ] [       ] [   60] mvn:org.codehaus.woodstox/woodstox-core-asl/4.0.8
[ 110] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.wsdl4j/1.6.2_2
[ 111] [Active     ] [            ] [       ] [   60] mvn:org.apache.ws.commons.schema/XmlSchema/1.4.5
[ 112] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlresolver/1.2_2
[ 113] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlsec/1.4.3_2
[ 114] [Active     ] [            ] [       ] [   60] mvn:org.apache.ws.security/wss4j/1.5.8
[ 115] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xerces/2.9.1_3
[ 116] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.bcel/5.2_2
[ 117] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan/2.7.1_2
[ 118] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr311-api-1.0/1.5.0
[ 119] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.opensaml/1.1_3
[ 120] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlbeans/2.4.0_3
[ 121] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-lang/2.4_3
[ 122] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-collections/3.2.1_1-fuse
[ 123] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oro/2.0.8_3
[ 124] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity/1.6.2_3
[ 125] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera/0.4.0-incubating_3
[ 126] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-codec/1.3_2
[ 127] [Active     ] [            ] [       ] [   60] mvn:org.codehaus.jettison/jettison/1.2
[ 128] [Active     ] [            ] [       ] [   60] mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jdom/1.1_2
[ 129] [Active     ] [            ] [       ] [   60] mvn:org.apache.ws.commons.axiom/axiom-impl/1.2.8
[ 130] [Active     ] [            ] [       ] [   60] mvn:org.apache.ws.commons.axiom/axiom-api/1.2.8
[ 131] [Active     ] [            ] [Started] [   60] mvn:org.apache.cxf/cxf-bundle/2.2.11
[ 133] [Active     ] [            ] [       ] [   60] mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.2
[ 134] [Active     ] [            ] [       ] [   60] mvn:org.eclipse.jetty/jetty-util/7.2.0.v20101020
[ 135] [Active     ] [            ] [       ] [   60] mvn:org.eclipse.jetty/jetty-io/7.2.0.v20101020
[ 136] [Active     ] [            ] [       ] [   60] mvn:org.eclipse.jetty/jetty-http/7.2.0.v20101020
[ 137] [Active     ] [            ] [       ] [   60] mvn:org.eclipse.jetty/jetty-xml/7.2.0.v20101020
[ 138] [Active     ] [            ] [       ] [   60] mvn:org.eclipse.jetty/jetty-continuation/7.2.0.v20101020
[ 139] [Active     ] [            ] [       ] [   60] mvn:org.eclipse.jetty/jetty-server/7.2.0.v20101020
[ 140] [Active     ] [            ] [       ] [   60] mvn:org.eclipse.jetty/jetty-security/7.2.0.v20101020
[ 141] [Active     ] [            ] [       ] [   60] mvn:org.eclipse.jetty/jetty-servlet/7.2.0.v20101020
[ 142] [Active     ] [            ] [       ] [   60] mvn:org.ops4j.pax.web/pax-web-api/0.8.1
[ 143] [Active     ] [            ] [       ] [   60] mvn:org.ops4j.pax.web/pax-web-spi/0.8.1
[ 144] [Active     ] [            ] [       ] [   60] mvn:org.ops4j.pax.web/pax-web-runtime/0.8.1
[ 145] [Active     ] [            ] [       ] [   60] mvn:org.ops4j.pax.web/pax-web-jetty/0.8.1
[ 146] [Active     ] [            ] [       ] [   60] mvn:org.ops4j.pax.web/pax-web-jsp/0.8.1
[ 147] [Active     ] [            ] [       ] [   60] mvn:org.ops4j.pax.web/pax-web-extender-war/0.8.1
[ 148] [Active     ] [            ] [       ] [   60] mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/0.8.1
[ 149] [Active     ] [            ] [       ] [   60] mvn:org.ops4j.pax.url/pax-url-war/1.2.0
[ 150] [Active     ] [Created     ] [       ] [   60] mvn:org.apache.karaf.deployer/org.apache.karaf.deployer.war/2.1.1
[ 151] [Active     ] [            ] [Started] [   60] mvn:com.schneider/TestXmlAdapter/0.0.1-SNAPSHOT

When you try to access to the service you are an exception and a sever error. 

$ wget http://127.0.0.1:8181/cxf/testxml/ids2
--2010-11-18 14:49:28--  http://127.0.0.1:8181/cxf/testxml/ids2
Connecting to 127.0.0.1:8181... connected.
HTTP request sent, awaiting response... 500 Server Error
2010-11-18 14:49:54 ERROR 500: Server Error.



> jaxrs: ParameterizedTypeImpl cannot be cast to java.lang.Class
> --------------------------------------------------------------
>
>                 Key: CXF-3110
>                 URL: https://issues.apache.org/jira/browse/CXF-3110
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.10
>         Environment: window on cygwin
> osgi karaf 2.1.0
>            Reporter: Stephane Chomat
>         Attachments: testxmladapter.zip
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> My xmlAdapter extends XmlAdapter<ArrayList<String>, Set<String>> and
it's not supported
> But XmlAdapter<ArrayList, Set<String>> is supported.
> java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
cannot be cast to java.lang.Class
>         at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.getActualType(AbstractJAXBProvider.java:453)
>         at org.apache.cxf.jaxrs.provider.JSONProvider.writeTo(JSONProvider.java:266)
>         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:248)
>         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:139)
>         at org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:78)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
>         at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:78)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
>         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:111)
>         at org.apache.cxf.transport.http_osgi.OsgiDestination.doMessage(OsgiDestination.java:80)
>         at org.apache.cxf.transport.http_osgi.OsgiServletController.invokeDestination(OsgiServletController.java:321)
>         at org.apache.cxf.transport.http_osgi.OsgiServletController.invoke(OsgiServletController.java:107)
>         at org.apache.cxf.transport.http_osgi.OsgiServlet.invoke(OsgiServlet.java:53)
>         at org.apache.cxf.transport.http_osgi.SpringOsgiServlet.invoke(SpringOsgiServlet.java:48)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:108)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
>         at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64)
>         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>         at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.handle(HttpServiceContext.java:111)
>         at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64)
>         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>         at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

-- 
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