users@jersey.java.net

Re: [Jersey] Jersey Spring CONTEXT_CONFIG_LOCATION <was> Re: [Jersey] Problems using JerseyTest

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 13 Oct 2009 11:48:55 +0200

On Oct 13, 2009, at 11:38 AM, tarjei wrote:

> Hei,
>
>
> On 10/08/2009 01:18 PM, Paul Sandoz wrote:
>>
>> On Oct 8, 2009, at 12:36 PM, tarjei wrote:
>>
>>> Great :)
>>>
>>> Do you have maven packages somewhere I can test them?
>>
>> Not yet.
>>
>> Because of java.net issues it might take a while until the Hudson job
>> can build and push the bits out. HOwever, i hope something will be
>> available either later today or tomorrow.
>
>
> Hi, do you have an url to the Maven repo for the snapshots? I tried
> to find the binaries but didn't succeed.
>

http://download.java.net/maven/2/com/sun/jersey

You could try version 1.1.4-ea-SNAPSHOT (8th Oct) or 1.1.5-ea-SNAPSHOT
(9th Oct). However, because of java.net issues i cannot guarantee the
fixed made it in.

Paul.

>
> Regards,
> Tarjei
>
>>
>> Paul.
>>
>>> regards,
>>> Tarjei
>>> On 10/08/2009 12:10 PM, Paul Sandoz wrote:
>>>>
>>>> On Oct 7, 2009, at 11:47 AM, tarjei wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> On 10/06/2009 04:09 PM, Paul Sandoz wrote:
>>>>>>
>>>>>> I think this is a bug in the Jersey spring configuration and it
>>>>>> should
>>>>>> also fail if using a web.xml. Is that your experience?
>>>>> I do not wire web.xml the same way but your analysis below seems
>>>>> correct to me.
>>>>>
>>>>> I have posted a bug[1] on the issue. Do you think a fix will be
>>>>> included in the 1.1.4 release?
>>>>>
>>>>> 1. https://jersey.dev.java.net/issues/show_bug.cgi?id=381
>>>>>
>>>>
>>>> Fixed in the 1.1.4 branch (i will also propagate to the trunk).
>>>>
>>>> Paul.
>>>>
>>>>
>>>>> kind regards,
>>>>> Tarjei
>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> The problem is in the following method on the Jersey
>>>>>> SpringServlet:
>>>>>>
>>>>>> private ConfigurableApplicationContext getChildContext(String
>>>>>> contextConfigLocation) {
>>>>>> final ConfigurableWebApplicationContext ctx = new
>>>>>> XmlWebApplicationContext();
>>>>>> ctx.setParent(getDefaultContext());
>>>>>> ctx.setServletContext(getServletContext());
>>>>>> ctx.setConfigLocations(new String[]{contextConfigLocation}); //
>>>>>> <-- Problem is here
>>>>>>
>>>>>> ctx.refresh();
>>>>>> return ctx;
>>>>>> }
>>>>>>
>>>>>> It appears that the method call to:
>>>>>>
>>>>>> ctx.setConfigLocations(new String[]{contextConfigLocation});
>>>>>>
>>>>>> http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/web/context/ConfigurableWebApplicationContext.html#setConfigLocations%28java.lang.String
>>>>>> []%29
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> is wrong and it should be:
>>>>>>
>>>>>> ctx.setConfigLocation(contextConfigLocation);
>>>>>>
>>>>>> i.e. the call with the array assumes only one location per
>>>>>> element.
>>>>>>
>>>>>> Could you log an issue?
>>>>>
>>>>>
>>>>> --
>>>>> Tarjei Huse
>>>>> Mobil: 920 63 413
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>>
>>>
>>>
>>> --
>>> Tarjei Huse
>>> Mobil: 920 63 413
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
>
> --
> Tarjei Huse
> Mobil: 920 63 413
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>