You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Blue Diamond <gv...@gmail.com> on 2012/04/13 13:23:04 UTC
JAX-RS backward compatibility issues in CXF 2.5.2
Hi,
I am facing some serious backward compatibility issues on JAX-RS front with
CXF 2.5.2
I migrated from 2.3.0 to 2.5.2.
@Path() that worked before are not working now.
Here's a list of what was working in 2.3.0 & not working with 2.5.2
URL: http://host:8080/odata/$metadata
@Path("/\\$metadata")
URL: http://host:8080/odata/%24metadata
@Path("/%24metadata")
Both the above URLs are not working. I see this error on the server side:
WARNING: WebApplicationException has been caught : no cause is available
With 2.5.2, when I changed to @Path("/$metadata"), then the /%24metadata
URL form started working.
Another problem is that, I used to have @Path("/\\$metadata/{path:.+}")
which was handling all kinds of $metadata/Types, $metadata/Properties etc..
URL formats.. None of them are working now. The server shows the same error
message.
Can someone help me how I can get all those supported URLs to work with CXF
2.5.2?
Thanks & Regards,
Anil
Re: JAX-RS backward compatibility issues in CXF 2.5.2
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 13/04/12 12:23, Blue Diamond wrote:
> Hi,
>
> I am facing some serious backward compatibility issues on JAX-RS front with
> CXF 2.5.2
> I migrated from 2.3.0 to 2.5.2.
>
> @Path() that worked before are not working now.
>
> Here's a list of what was working in 2.3.0& not working with 2.5.2
>
> URL: http://host:8080/odata/$metadata
> @Path("/\\$metadata")
>
> URL: http://host:8080/odata/%24metadata
> @Path("/%24metadata")
>
> Both the above URLs are not working. I see this error on the server side:
> WARNING: WebApplicationException has been caught : no cause is available
>
> With 2.5.2, when I changed to @Path("/$metadata"), then the /%24metadata
> URL form started working.
Are you saying '@Path("/$metadata")' catches '/%24metadata' ? That can
only be possible if you use Tomcat which decodes '%24' - make sure you
configure Tomcat not to.
>
I've tested it locally with CXF 2.6.0 (CXF 2.5.3 has the same code for
dealing with all these extra characters), works fine, I do not think you
should escape '$' in regular Path expressions, only when using explicit
regular expressions if you need to distinguish between reserved regex
and literal characters, so
http://host:8080/odata/$metadata
will work with
@Path("/$metadata")
and similarly for %24.
CXF 2.5.3 should be out next week
> Another problem is that, I used to have @Path("/\\$metadata/{path:.+}")
> which was handling all kinds of $metadata/Types, $metadata/Properties etc..
> URL formats.. None of them are working now. The server shows the same error
> message.
>
Please do not escape '$' in the plain expressions, I did some fixes for
similar (actually OData related queries for 2.5.2) so even if something
does not work for 2.5.2 then 2.5.3 should definitely manage...
HTH, SErgey
> Can someone help me how I can get all those supported URLs to work with CXF
> 2.5.2?
>
> Thanks& Regards,
> Anil
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com