users@jersey.java.net

[Jersey] Re: Jersey 1 client in Jersey 2 server

From: Saad Mufti <saad.mufti_at_gmail.com>
Date: Tue, 17 Jun 2014 12:31:37 -0400

That is good to know, I had totally missed that this is now possible in 2.9
. My previous response was based on earlier when I tried with with Jersey
2.6.

Cheers.

-----
Saad


On Tue, Jun 17, 2014 at 12:05 PM, Marek Potociar <marek.potociar_at_oracle.com>
wrote:

> Hi Jonas,
>
> Using latest Jersey 1.x client (1.18.1) should work with Jersey 2.9 server
> and later (a side-effect of disabling META-INF/services scanning in
> Jersey 2.x by default
> <https://jersey.java.net/documentation/2.9/migration.html#d0e15895>).
>
> You are reporting that there is some dependency from jersey 1.x client to
> jersey 1.x server, but I do not see that to be the case. Here's output from
> mvn dependency:tree for jersey 1.x client module:
>
> [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ jersey-client
> ---
> [INFO] com.sun.jersey:jersey-client:jar:1.19-SNAPSHOT
> [INFO] +- junit:junit:jar:4.8.2:test
> [INFO] +- com.sun.net.httpserver:http:jar:20070405:test
> [INFO] +- org.osgi:osgi_R4_core:jar:1.0:provided
> [INFO] \- com.sun.jersey:jersey-core:jar:1.19-SNAPSHOT:compile
>
> ...as you can see, there is no jersey-server dependency in the list.
>
> HTH,
> Marek
>
> On 17 Jun 2014, at 09:24, Jonas Bergström <luckyswede_at_gmail.com> wrote:
>
> Hello again,
> Does anybody have any thoughts on this?
> Is upgrading to Jersey 2 just not going to work if I have dependencies
> that use the Jersey 1 client?
>
> / Jonas
>
>
> 2014-06-08 23:36 GMT+02:00 Jonas Bergström <luckyswede_at_gmail.com>:
>
>> Hi,
>> I'm upgrading my application from Jersey 1.x to Jersey 2.x and getting
>> problems because a couple of my dependencies use the Jersey 1.x client and
>> it seems impossible to run that one in a Jersey 2 server. I've tried
>> removing the 1.x server jar but the client seems to depend on it somehow.
>>
>> Is there a workaround?
>> Would it be possible to enhance Jersey 2 to allow 1.x on the path?
>>
>> My main reason for upgrading is to get async support (void method with
>> @Suspended parameter). Are there any other ways of achieving that while
>> staying on 1.x?
>>
>> Thanks / Jonas
>>
>
>
>