OW2 Bundles

Log Implementation should be configurable

Details

  • Type: New Feature New Feature
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: OW2 Bundles 1.0.3
  • Fix Version/s: OW2 Bundles 1.0.7
  • Component/s: Third Party Bundles
  • Labels:
    None
  • Environment:
    Easybeans 1.0 OSGI - Hibernate - Equinox 3.4SDK - OSX 10.5.3 - JDK 1.5

Description

it should be possible to configure the Log Implementation, per example using Log4J

I want to use com.springsource.org.apache.log4j-1.2.15.jar + com.springsource.org.apache.commons.logging-1.1.1.jar
instead of
ow2-bundles-externals-commons-logging-1.0.5.jar

if I'm doing this at the moment I got an error
org.apache.commons.logging.LogConfigurationException: No suitable Log implementation

ekke
see also
http://www.nabble.com/using-log4j-in-EZB-OSGI-%28equinox%29-to17624871.html

Activity

Hide
ekkehard gentz added a comment -
its really frustrating to run in such

Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log implementation
at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:842)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:307)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645)
at org.apache.commons.modeler.Registry.<clinit>(Registry.java:85)
... 31 more

...adding some bundles working with log4j and then it happens again

did tests with 1.0.1, 1.1.0, Eclipse + Equinox 3.4, OSX 10.5.4 - jdk 1.5

THX for looking into this

ekke
Show
ekkehard gentz added a comment - its really frustrating to run in such Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log implementation at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:842) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:307) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645) at org.apache.commons.modeler.Registry.<clinit>(Registry.java:85) ... 31 more ...adding some bundles working with log4j and then it happens again did tests with 1.0.1, 1.1.0, Eclipse + Equinox 3.4, OSX 10.5.4 - jdk 1.5 THX for looking into this ekke
Hide
Florent BENOIT added a comment -
Dynamic import on log4j has been added
Show
Florent BENOIT added a comment - Dynamic import on log4j has been added
Hide
ekkehard gentz added a comment -
downloaded 1.1.0 snapshot from today
should the modified ow2-bundles-externals-commons-logging be there ?
Show
ekkehard gentz added a comment - downloaded 1.1.0 snapshot from today should the modified ow2-bundles-externals-commons-logging be there ?
Hide
Florent BENOIT added a comment -
I think that yes it is included.
But to be sure, maybe you could look at the MANIFEST of the bundle.
Show
Florent BENOIT added a comment - I think that yes it is included. But to be sure, maybe you could look at the MANIFEST of the bundle.
Hide
ekkehard gentz added a comment -
I did - and its the same as before:
only commons-logging as import and export - nothing else
Show
ekkehard gentz added a comment - I did - and its the same as before: only commons-logging as import and export - nothing else
Hide
Florent BENOIT added a comment -
Yes, I think that the change is present in the tagged version of ow2 bundles or the newer snapshot, I will update the OSGi assembly of EasyBeans
Show
Florent BENOIT added a comment - Yes, I think that the change is present in the tagged version of ow2 bundles or the newer snapshot, I will update the OSGi assembly of EasyBeans
Hide
ekkehard gentz added a comment -
just downloaded the new 1.1.0 snapshot from today 16:59

this is the manifest:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: OW2 Bundles :: Externals :: Commons Logging
Bundle-SymbolicName: org.ow2.bundles.ow2-bundles-externals-commons-logging
Bundle-Version: 1.0.7.SNAPSHOT
Bundle-Vendor: OW2 Consortium
Export-Package: org.apache.commons.logging
Bnd-LastModified: 1216115220877
Build-Jdk: 1.5.0_11
Import-Package: org.apache.commons.logging
Bundle-DocURL: http://www.ow2.org
Created-By: Apache Maven Bundle Plugin
Private-Package: org.apache.commons.logging.impl
Built-By: jonas
Bundle-Description: Commons Logging Library
Bundle-License: http://www.gnu.org/copyleft/lesser.html
Tool: Bnd-0.0.238
Show
ekkehard gentz added a comment - just downloaded the new 1.1.0 snapshot from today 16:59 this is the manifest: Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: OW2 Bundles :: Externals :: Commons Logging Bundle-SymbolicName: org.ow2.bundles.ow2-bundles-externals-commons-logging Bundle-Version: 1.0.7.SNAPSHOT Bundle-Vendor: OW2 Consortium Export-Package: org.apache.commons.logging Bnd-LastModified: 1216115220877 Build-Jdk: 1.5.0_11 Import-Package: org.apache.commons.logging Bundle-DocURL: http://www.ow2.org Created-By: Apache Maven Bundle Plugin Private-Package: org.apache.commons.logging.impl Built-By: jonas Bundle-Description: Commons Logging Library Bundle-License: http://www.gnu.org/copyleft/lesser.html Tool: Bnd-0.0.238
Hide
Florent BENOIT added a comment -
Iv'e updated the dependency so it should be present now
The previous version of ow2bundles (integrated in easybeans-osgi) was not incorporating the fix that you want
Show
Florent BENOIT added a comment - Iv'e updated the dependency so it should be present now The previous version of ow2bundles (integrated in easybeans-osgi) was not incorporating the fix that you want
Hide
ekkehard gentz added a comment -
florent,
I did some tests successfully:

1. using org.ow2.bundles.ow2-bundles-externals-commons-loggin together with other bundles using commons.logging or other bundles using log4j: it WORKS

2. don't use org.ow2.bundles.ow2-bundles-externals-commons-loggin.
only used springsource.commons.logging + springsource.log4j
and it runs also well :-)
this time per ex. hibernate (from easybeans.core) uses my log4j configuration

all tests done with latest 1.1.0 Snapshot

I think you must have changed more then the dynamic import, because with 1.0. it was not possible to work without org.ow2.bundles.ow2-bundles-externals-commons-loggin

thx for fixing this - I'll create a blog entry today how to log with EZB under equinox using log4j

ekke
Show
ekkehard gentz added a comment - florent, I did some tests successfully: 1. using org.ow2.bundles.ow2-bundles-externals-commons-loggin together with other bundles using commons.logging or other bundles using log4j: it WORKS 2. don't use org.ow2.bundles.ow2-bundles-externals-commons-loggin. only used springsource.commons.logging + springsource.log4j and it runs also well :-) this time per ex. hibernate (from easybeans.core) uses my log4j configuration all tests done with latest 1.1.0 Snapshot I think you must have changed more then the dynamic import, because with 1.0. it was not possible to work without org.ow2.bundles.ow2-bundles-externals-commons-loggin thx for fixing this - I'll create a blog entry today how to log with EZB under equinox using log4j ekke
Hide
Florent BENOIT added a comment -
Yes, there was a change in easybeans bundles too (remove a dependency to avoid that bnd put the package as a private package)

For springsource commons logging bundle, they're using in fact slf4j drop-in replacement of commons-logging.
Show
Florent BENOIT added a comment - Yes, there was a change in easybeans bundles too (remove a dependency to avoid that bnd put the package as a private package) For springsource commons logging bundle, they're using in fact slf4j drop-in replacement of commons-logging.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: