Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » question about logging and best practices
question about logging and best practices [message #333199] Mon, 01 December 2008 02:21 Go to next message
Eclipse UserFriend
Originally posted by: marc.esher.comcast.net

Greetings all,
I've been using apache commons logging in my plugin, and i've been
including the commons-logging-1.1 jar. However, I'm wondering whether it's
best practice to require it as a bundle and NOT include my own version of
it.

Thoughts? What do ya'll do?

The reason I ask is that a single user in the field is reporting an error
that looks like this:
java.lang.ExceptionInitializationError
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Invalid class loader
hierarchy. You have more than one version of
'org.apache.commons.logging.Log' visible, which is not allowed"

error, and I'm wondering if my bundling of commons-logging is to blame. To
complicate matters, the error is actually being thrown from inside of apache
axis, which i'm also using

thanks for insight.

Marc
Re: question about logging and best practices [message #333200 is a reply to message #333199] Mon, 01 December 2008 06:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ekkehard.gentz-software.de

Marc E schrieb:
> Greetings all,
> I've been using apache commons logging in my plugin, and i've been
> including the commons-logging-1.1 jar. However, I'm wondering whether
> it's best practice to require it as a bundle and NOT include my own
> version of it.
this is one of the main rules in osgi applications:

if you need a jar like apache.commons.logging dont include it into your
own bundle !

then at first look if the bundle was provided by one of the bundle
repositories: eclipse orbit, springsource enterprise bundles repositiory
or so. if you found it there, always use this.

if you need a jar not available in a repository, then create abundle for
each jar (PDE is your friend)

if ever possible use package-import as dependency instead of require
bundle - its more flexible

perhaps my blog entries about logging are helpful ?
http://ekkes-corner.org

ekke
>
> Thoughts? What do ya'll do?
>
> The reason I ask is that a single user in the field is reporting an
> error that looks like this:
> java.lang.ExceptionInitializationError
> org.apache.commons.logging.LogConfigurationException:
> org.apache.commons.logging.LogConfigurationException:
> org.apache.commons.logging.LogConfigurationException: Invalid class
> loader hierarchy. You have more than one version of
> 'org.apache.commons.logging.Log' visible, which is not allowed"
>
> error, and I'm wondering if my bundling of commons-logging is to blame.
> To complicate matters, the error is actually being thrown from inside of
> apache axis, which i'm also using
>
> thanks for insight.
>
> Marc
Re: question about logging and best practices [message #333212 is a reply to message #333200] Mon, 01 December 2008 10:27 Go to previous message
Eclipse UserFriend
Originally posted by: marc.esher.comcast.net

Excellent. Thanks ekke. I'll check out your series.

marc.

"ekke" <ekkehard@gentz-software.de> wrote in message
news:ggvuij$16p$1@build.eclipse.org...
> Marc E schrieb:
>> Greetings all,
>> I've been using apache commons logging in my plugin, and i've been
>> including the commons-logging-1.1 jar. However, I'm wondering whether
>> it's best practice to require it as a bundle and NOT include my own
>> version of it.
> this is one of the main rules in osgi applications:
>
> if you need a jar like apache.commons.logging dont include it into your
> own bundle !
>
> then at first look if the bundle was provided by one of the bundle
> repositories: eclipse orbit, springsource enterprise bundles repositiory
> or so. if you found it there, always use this.
>
> if you need a jar not available in a repository, then create abundle for
> each jar (PDE is your friend)
>
> if ever possible use package-import as dependency instead of require
> bundle - its more flexible
>
> perhaps my blog entries about logging are helpful ?
> http://ekkes-corner.org
>
> ekke
>>
>> Thoughts? What do ya'll do?
>>
>> The reason I ask is that a single user in the field is reporting an error
>> that looks like this:
>> java.lang.ExceptionInitializationError
>> org.apache.commons.logging.LogConfigurationException:
>> org.apache.commons.logging.LogConfigurationException:
>> org.apache.commons.logging.LogConfigurationException: Invalid class
>> loader hierarchy. You have more than one version of
>> 'org.apache.commons.logging.Log' visible, which is not allowed"
>>
>> error, and I'm wondering if my bundling of commons-logging is to blame.
>> To complicate matters, the error is actually being thrown from inside of
>> apache axis, which i'm also using
>>
>> thanks for insight.
>>
>> Marc
Previous Topic:How to exclude a string in a regex search?
Next Topic:CompareUI return code
Goto Forum:
  


Current Time: Sat Jul 27 12:38:25 GMT 2024

Powered by FUDForum. Page generated in 0.03302 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top