| question about logging and best practices [message #333199] | 
Sun, 30 November 2008 21:21   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 01:00    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 05:27   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.06284 seconds