EasyBeans is an open source implementation by ObjectWeb of the EJB3 container specification. 
X Wiki
  History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BUNDLE-2
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Florent BENOIT
Reporter: ekkehard gentz
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OW2 Bundles

Log Implementation should be configurable

Created: 04/Jun/08 11:50 AM   Updated: 30/Jul/09 03:08 PM
Component/s: Third Party Bundles
Affects Version/s: OW2 Bundles 1.0.3
Fix Version/s: OW2 Bundles 1.0.7

Environment: Easybeans 1.0 OSGI - Hibernate - Equinox 3.4SDK - OSX 10.5.3 - JDK 1.5


 Description  « Hide
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

 All   Comments   Change History   Related Builds      Sort Order:
ekkehard gentz - 10/Jul/08 11:56 PM
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

Florent BENOIT - 15/Jul/08 05:18 PM
Dynamic import on log4j has been added

ekkehard gentz - 16/Jul/08 03:46 PM
downloaded 1.1.0 snapshot from today
should the modified ow2-bundles-externals-commons-logging be there ?

Florent BENOIT - 16/Jul/08 04:25 PM
I think that yes it is included.
But to be sure, maybe you could look at the MANIFEST of the bundle.

ekkehard gentz - 16/Jul/08 04:30 PM
I did - and its the same as before:
only commons-logging as import and export - nothing else

Florent BENOIT - 16/Jul/08 04:44 PM
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

ekkehard gentz - 16/Jul/08 06:25 PM
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

Florent BENOIT - 16/Jul/08 06:59 PM
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

ekkehard gentz - 17/Jul/08 08:53 AM
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

Florent BENOIT - 17/Jul/08 10:32 AM
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.


Copyright © 2006-2007 EasyBeans / ObjectWeb consortium

http://www.easybeans.org