You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Dennis Kieselhorst <ma...@dekies.de> on 2012/11/30 09:35:20 UTC

ClassCastException using CXF 2.7.0 JAX-RS Client in JBoss AS7

Hi,

I have trouble with CXF 2.7.0 in a JBoss AS7 environment. There is a
classpath conflict with the RESTEasy Response class:


It's already described in the JBoss Community
(https://community.jboss.org/message/779129,
https://community.jboss.org/message/779130 and
https://issues.jboss.org/browse/AS7-2476).

Is it possible to create a workaround in CXF? The same code works with CXF
2.6.2...

Regards
Dennis



--
View this message in context: http://cxf.547215.n5.nabble.com/ClassCastException-using-CXF-2-7-0-JAX-RS-Client-in-JBoss-AS7-tp5719483.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: ClassCastException using CXF 2.7.0 JAX-RS Client in JBoss AS7

Posted by Dennis Kieselhorst <ma...@dekies.de>.
Sergey Beryozkin-5 wrote
> Can you please experiment with replacing jsr311-api with jsr339-api 
> somewhere in JBoss distro ? jsr339-api is backward compatible with 
> jsr311-api - so hopefully this should work...

I replaced
modules/javax/ws/rs/api/main/jboss-jaxrs-api_1.1_spec-1.0.1.Final-redhat-1.jar
with javax.ws.rs-api-2.0-m10.jar which results in an AbstractMethodError:



There was  another hint by Stuart Douglas
<https://community.jboss.org/message/779402#779402>   but excluding the
resteasy subsystem still causes a ClassCastException (I'm using EAP 6, so it
should work).

Regards
Dennis



--
View this message in context: http://cxf.547215.n5.nabble.com/ClassCastException-using-CXF-2-7-0-JAX-RS-Client-in-JBoss-AS7-tp5719483p5719563.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: ClassCastException using CXF 2.7.0 JAX-RS Client in JBoss AS7

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 30/11/12 15:17, Dennis Kieselhorst wrote:
> Sergey Beryozkin-5 wrote
>> I wonder is it only down to using CXF 2.7.0 ? You said you got it
>> working with CXF 2.6.x, right ?
>
> Right, 2.6.2 is working fine!
>
So, JBoss 7 is really friendly then :-),

The only major difference that comes with CXF is the fact jsr339-api 
(m10) is used with CXF 2.7.0.

Can you please experiment with replacing jsr311-api with jsr339-api 
somewhere in JBoss distro ? jsr339-api is backward compatible with 
jsr311-api - so hopefully this should work...

Cheers,
Sergey



>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/ClassCastException-using-CXF-2-7-0-JAX-RS-Client-in-JBoss-AS7-tp5719483p5719505.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: ClassCastException using CXF 2.7.0 JAX-RS Client in JBoss AS7

Posted by Dennis Kieselhorst <ma...@dekies.de>.
Sergey Beryozkin-5 wrote
> I wonder is it only down to using CXF 2.7.0 ? You said you got it 
> working with CXF 2.6.x, right ?

Right, 2.6.2 is working fine!



--
View this message in context: http://cxf.547215.n5.nabble.com/ClassCastException-using-CXF-2-7-0-JAX-RS-Client-in-JBoss-AS7-tp5719483p5719505.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: ClassCastException using CXF 2.7.0 JAX-RS Client in JBoss AS7

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Dennis
On 30/11/12 14:00, Dennis Kieselhorst wrote:
> Hi Sergey,
>
> thanks for the quick response.
>
>
> Sergey Beryozkin-5 wrote
>> Can the following help somehow:
>>
>> https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Deployment#JAX-RSDeployment-JBoss
>
> I tried commenting out the JBoss JAX-RS extension/ subsystem without effect.
> I haven't found any global configuration attributes for RESTEasy, so it
> seems not possible to disable it. The documentation says:
> /RESTEasy is bundled with JBoss AS 7 and completely integrated as per the
> requirements of Java EE 6./

Sure, I guess this refers to JAX-RS 1.1 (and 2.0) requirements toward 
having JAX-RS implementations running on EE containers supporting CDI & 
EJB.

I wonder is it only down to using CXF 2.7.0 ? You said you got it 
working with CXF 2.6.x, right ?

Cheers, Sergey

>
> Regards
> Dennis
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/ClassCastException-using-CXF-2-7-0-JAX-RS-Client-in-JBoss-AS7-tp5719483p5719500.html
> Sent from the cxf-user mailing list archive at Nabble.com.


Re: ClassCastException using CXF 2.7.0 JAX-RS Client in JBoss AS7

Posted by Dennis Kieselhorst <ma...@dekies.de>.
Hi Sergey,

thanks for the quick response.


Sergey Beryozkin-5 wrote
> Can the following help somehow:
>  
> https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Deployment#JAX-RSDeployment-JBoss

I tried commenting out the JBoss JAX-RS extension/ subsystem without effect.
I haven't found any global configuration attributes for RESTEasy, so it
seems not possible to disable it. The documentation says:
/RESTEasy is bundled with JBoss AS 7 and completely integrated as per the
requirements of Java EE 6./

Regards
Dennis



--
View this message in context: http://cxf.547215.n5.nabble.com/ClassCastException-using-CXF-2-7-0-JAX-RS-Client-in-JBoss-AS7-tp5719483p5719500.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: ClassCastException using CXF 2.7.0 JAX-RS Client in JBoss AS7

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Dennis
On 30/11/12 08:35, Dennis Kieselhorst wrote:
> Hi,
>
> I have trouble with CXF 2.7.0 in a JBoss AS7 environment. There is a
> classpath conflict with the RESTEasy Response class:
>
>
> It's already described in the JBoss Community
> (https://community.jboss.org/message/779129,
> https://community.jboss.org/message/779130 and
> https://issues.jboss.org/browse/AS7-2476).

thanks for the links

>
> Is it possible to create a workaround in CXF? The same code works with CXF
> 2.6.2...

Can the following help somehow:

https://cwiki.apache.org/confluence/display/CXF20DOC/JAX-RS+Deployment#JAX-RSDeployment-JBoss

Let me know please

Thanks, Sergey

>
> Regards
> Dennis
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/ClassCastException-using-CXF-2-7-0-JAX-RS-Client-in-JBoss-AS7-tp5719483.html
> Sent from the cxf-user mailing list archive at Nabble.com.