Orbeon configuration problem - solved

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Orbeon configuration problem - solved

Tim Pizey
Hi,

I am new to Orbeon and so just finding my way around.

I had difficulty customising Orbeon, following the excellent documentation at
http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties
the problem was that my settings in config/properties-local.xml were
having no effect.

When I moved it 'up' the classpath then they started taking effect.

I think that this may be due to one or more 'empty' copies of
config/properties-local.xml on the classpath; one of which I located
in my copy of orbeon-resources-private.jar

I hope this saves someone else some time.


yours
Tim Pizey


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon configuration problem - solved

Alessandro  Vernet
Administrator
Tim,

Thanks for sharing. Note that the "normal" way of overriding
properties is to put the properties-local.xml in
WEB-INF/resources/config. What is in WEB-INF/resources has priority
compared to what is in the classpath. BTW, this is configurable in the
web.xml (see the oxf.resources.priority.1, 2...). If you put your
properties-local.xml in the classpath, then it may or may not override
the empty one in the Orbeon's jar, depending on the order in which
those show up in the classpath. I this hope sheds some light on how
resources are being loaded.

Alex

On Wed, Apr 21, 2010 at 6:53 AM, Tim Pizey <[hidden email]> wrote:

> Hi,
>
> I am new to Orbeon and so just finding my way around.
>
> I had difficulty customising Orbeon, following the excellent documentation at
> http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties
> the problem was that my settings in config/properties-local.xml were
> having no effect.
>
> When I moved it 'up' the classpath then they started taking effect.
>
> I think that this may be due to one or more 'empty' copies of
> config/properties-local.xml on the classpath; one of which I located
> in my copy of orbeon-resources-private.jar
>
> I hope this saves someone else some time.
>
>
> yours
> Tim Pizey
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Orbeon configuration problem - solved

Tim Pizey
Hi Alessandro,

I did not set the classpath explicitly, eclipse did some magic.

What is the reason for having an empty version of a
properties-local.xml  at all?
Does Orbeon have a problem if not found?

I would suggest that this is a newbie trap and it would be better for
there not to be
an empty copy in the distributed jar.

cheers
Tim


On 22 April 2010 23:40, Alessandro Vernet  wrote:

> Tim,
>
> Thanks for sharing. Note that the "normal" way of overriding
> properties is to put the properties-local.xml in
> WEB-INF/resources/config. What is in WEB-INF/resources has priority
> compared to what is in the classpath. BTW, this is configurable in the
> web.xml (see the oxf.resources.priority.1, 2...). If you put your
> properties-local.xml in the classpath, then it may or may not override
> the empty one in the Orbeon's jar, depending on the order in which
> those show up in the classpath. I this hope sheds some light on how
> resources are being loaded.
>
> Alex
>
> On Wed, Apr 21, 2010 at 6:53 AM, Tim Pizey  wrote:
>> Hi,
>>
>> I am new to Orbeon and so just finding my way around.
>>
>> I had difficulty customising Orbeon, following the excellent documentation at
>> http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties
>> the problem was that my settings in config/properties-local.xml were
>> having no effect.
>>
>> When I moved it 'up' the classpath then they started taking effect.
>>
>> I think that this may be due to one or more 'empty' copies of
>> config/properties-local.xml on the classpath; one of which I located
>> in my copy of orbeon-resources-private.jar
>>
>> I hope this saves someone else some time.
>>
>>
>> yours
>> Tim Pizey
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/
> My Twitter: http://twitter.com/avernet
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Orbeon configuration problem - solved

Alessandro  Vernet
Administrator
Tim,

That's right: there is code that expects properties-local.xml to
always be present, hence the empty properties-local.xml in the jar.

Alex

On Sat, Apr 24, 2010 at 11:48 AM, Tim Pizey <[hidden email]> wrote:

> Hi Alessandro,
>
> I did not set the classpath explicitly, eclipse did some magic.
>
> What is the reason for having an empty version of a
> properties-local.xml  at all?
> Does Orbeon have a problem if not found?
>
> I would suggest that this is a newbie trap and it would be better for
> there not to be
> an empty copy in the distributed jar.
>
> cheers
> Tim
>
>
> On 22 April 2010 23:40, Alessandro Vernet  wrote:
>> Tim,
>>
>> Thanks for sharing. Note that the "normal" way of overriding
>> properties is to put the properties-local.xml in
>> WEB-INF/resources/config. What is in WEB-INF/resources has priority
>> compared to what is in the classpath. BTW, this is configurable in the
>> web.xml (see the oxf.resources.priority.1, 2...). If you put your
>> properties-local.xml in the classpath, then it may or may not override
>> the empty one in the Orbeon's jar, depending on the order in which
>> those show up in the classpath. I this hope sheds some light on how
>> resources are being loaded.
>>
>> Alex
>>
>> On Wed, Apr 21, 2010 at 6:53 AM, Tim Pizey  wrote:
>>> Hi,
>>>
>>> I am new to Orbeon and so just finding my way around.
>>>
>>> I had difficulty customising Orbeon, following the excellent documentation at
>>> http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties
>>> the problem was that my settings in config/properties-local.xml were
>>> having no effect.
>>>
>>> When I moved it 'up' the classpath then they started taking effect.
>>>
>>> I think that this may be due to one or more 'empty' copies of
>>> config/properties-local.xml on the classpath; one of which I located
>>> in my copy of orbeon-resources-private.jar
>>>
>>> I hope this saves someone else some time.
>>>
>>>
>>> yours
>>> Tim Pizey
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>>
>>
>> --
>> Orbeon Forms - Web forms, open-source, for the Enterprise -
>> http://www.orbeon.com/
>> My Twitter: http://twitter.com/avernet
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Orbeon configuration problem - solved

Tim Pizey
Alessandro,

Sorry to labour the point but the code should not expect
properties-local.xml to be present.
The empty default should not be present then this mis behaviour would
not occur.
The fix is to cope with the file not being present, not to supply an
empty default.

It makes no sense for the 'local' file to be in the distribution.
the whole point of a -local pattern is to avoid local modifications
being overridden
by the distribution.

cheers
Tim


On 28 April 2010 07:19, Alessandro Vernet  wrote:

> Tim,
>
> That's right: there is code that expects properties-local.xml to
> always be present, hence the empty properties-local.xml in the jar.
>
> Alex
>
> On Sat, Apr 24, 2010 at 11:48 AM, Tim Pizey  wrote:
>> Hi Alessandro,
>>
>> I did not set the classpath explicitly, eclipse did some magic.
>>
>> What is the reason for having an empty version of a
>> properties-local.xml  at all?
>> Does Orbeon have a problem if not found?
>>
>> I would suggest that this is a newbie trap and it would be better for
>> there not to be
>> an empty copy in the distributed jar.
>>
>> cheers
>> Tim
>>
>>
>> On 22 April 2010 23:40, Alessandro Vernet  wrote:
>>> Tim,
>>>
>>> Thanks for sharing. Note that the "normal" way of overriding
>>> properties is to put the properties-local.xml in
>>> WEB-INF/resources/config. What is in WEB-INF/resources has priority
>>> compared to what is in the classpath. BTW, this is configurable in the
>>> web.xml (see the oxf.resources.priority.1, 2...). If you put your
>>> properties-local.xml in the classpath, then it may or may not override
>>> the empty one in the Orbeon's jar, depending on the order in which
>>> those show up in the classpath. I this hope sheds some light on how
>>> resources are being loaded.
>>>
>>> Alex
>>>
>>> On Wed, Apr 21, 2010 at 6:53 AM, Tim Pizey  wrote:
>>>> Hi,
>>>>
>>>> I am new to Orbeon and so just finding my way around.
>>>>
>>>> I had difficulty customising Orbeon, following the excellent documentation at
>>>> http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties
>>>> the problem was that my settings in config/properties-local.xml were
>>>> having no effect.
>>>>
>>>> When I moved it 'up' the classpath then they started taking effect.
>>>>
>>>> I think that this may be due to one or more 'empty' copies of
>>>> config/properties-local.xml on the classpath; one of which I located
>>>> in my copy of orbeon-resources-private.jar
>>>>
>>>> I hope this saves someone else some time.
>>>>
>>>>
>>>> yours
>>>> Tim Pizey
>>>>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Orbeon configuration problem - solved

Erik Bruchez-3
Tim,

There is probably some misunderstanding about what the code should do or not.

config/properties-local.xml is always present within
orbeon-resources-private.jar, but that's an implementation detail.
It's basically a way of implementing a fallback mechanism in case you
don't have your own properties-local.xml under
WEB-INF/resources/config/properties-local.xml.

From the XForms developer's perspective, either you have
WEB-INF/resources/config/properties-local.xml or not. By default,
there is no WEB-INF/resources/config/properties-local.xml in the
distribution, just a template
WEB-INF/resources/config/properties-local.xml.template.

-Erik

On Wed, May 5, 2010 at 9:02 AM, Tim Pizey <[hidden email]> wrote:

> Alessandro,
>
> Sorry to labour the point but the code should not expect
> properties-local.xml to be present.
> The empty default should not be present then this mis behaviour would
> not occur.
> The fix is to cope with the file not being present, not to supply an
> empty default.
>
> It makes no sense for the 'local' file to be in the distribution.
> the whole point of a -local pattern is to avoid local modifications
> being overridden
> by the distribution.
>
> cheers
> Tim
>
>
> On 28 April 2010 07:19, Alessandro Vernet  wrote:
>> Tim,
>>
>> That's right: there is code that expects properties-local.xml to
>> always be present, hence the empty properties-local.xml in the jar.
>>
>> Alex
>>
>> On Sat, Apr 24, 2010 at 11:48 AM, Tim Pizey  wrote:
>>> Hi Alessandro,
>>>
>>> I did not set the classpath explicitly, eclipse did some magic.
>>>
>>> What is the reason for having an empty version of a
>>> properties-local.xml  at all?
>>> Does Orbeon have a problem if not found?
>>>
>>> I would suggest that this is a newbie trap and it would be better for
>>> there not to be
>>> an empty copy in the distributed jar.
>>>
>>> cheers
>>> Tim
>>>
>>>
>>> On 22 April 2010 23:40, Alessandro Vernet  wrote:
>>>> Tim,
>>>>
>>>> Thanks for sharing. Note that the "normal" way of overriding
>>>> properties is to put the properties-local.xml in
>>>> WEB-INF/resources/config. What is in WEB-INF/resources has priority
>>>> compared to what is in the classpath. BTW, this is configurable in the
>>>> web.xml (see the oxf.resources.priority.1, 2...). If you put your
>>>> properties-local.xml in the classpath, then it may or may not override
>>>> the empty one in the Orbeon's jar, depending on the order in which
>>>> those show up in the classpath. I this hope sheds some light on how
>>>> resources are being loaded.
>>>>
>>>> Alex
>>>>
>>>> On Wed, Apr 21, 2010 at 6:53 AM, Tim Pizey  wrote:
>>>>> Hi,
>>>>>
>>>>> I am new to Orbeon and so just finding my way around.
>>>>>
>>>>> I had difficulty customising Orbeon, following the excellent documentation at
>>>>> http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties
>>>>> the problem was that my settings in config/properties-local.xml were
>>>>> having no effect.
>>>>>
>>>>> When I moved it 'up' the classpath then they started taking effect.
>>>>>
>>>>> I think that this may be due to one or more 'empty' copies of
>>>>> config/properties-local.xml on the classpath; one of which I located
>>>>> in my copy of orbeon-resources-private.jar
>>>>>
>>>>> I hope this saves someone else some time.
>>>>>
>>>>>
>>>>> yours
>>>>> Tim Pizey
>>>>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws