commons-log is not deployed. As it works with value = slf4j instead of log4, openjpa can be configured to use log appender. So we do not to modify for the moment pax-logging
On Wed, Feb 9, 2011 at 6:32 PM, Guillaume Nodet <[email protected]> wrote: > Why isn't the package wired to pax-logging ? Did you deploy > commons-logging bundle ? You don't have to. > > On Wed, Feb 9, 2011 at 18:30, Charles Moulliard <[email protected]> wrote: >> We can use "commons" as value for openjpa.log but the info is >> displayed in the console of karaf. >> >> On Wed, Feb 9, 2011 at 5:30 PM, Guillaume Nodet <[email protected]> wrote: >>> I think it has been discussed previsouly and was seen as part of the >>> API, so not to be exported. >>> >>> If you configure openjpa to use slf4j or commons-logging as indicated >>> by Andreas, it should work better: >>> >>> http://openjpa.apache.org/builds/1.0.2/apache-openjpa-1.0.2/docs/manual/ref_guide_logging.html >>> >>> On Wed, Feb 9, 2011 at 16:18, Charles Moulliard <[email protected]> >>> wrote: >>>> Hi, >>>> >>>> When I try to enable the following option with openjpa to use log4j, >>>> karaf/felix generates the following error on the console : >>>> >>>> <property name="openjpa.Log" value="log4j"/> >>>> >>>> ERROR: EventDispatcher: Error during dispatch. >>>> (java.lang.NoClassDefFoundError: org/apache/log4j/LogManager) >>>> java.lang.NoClassDefFoundError: org/apache/log4j/LogManager >>>> at >>>> org.apache.openjpa.lib.log.Log4JLogFactory.newLogAdapter(Log4JLogFactory.java:33) >>>> at >>>> org.apache.openjpa.lib.log.LogFactoryAdapter.getLog(LogFactoryAdapter.java:40) >>>> at >>>> org.apache.openjpa.lib.conf.ConfigurationImpl.getLog(ConfigurationImpl.java:226) >>>> at >>>> org.apache.openjpa.conf.OpenJPAConfigurationImpl.getConfigurationLog(OpenJPAConfigurationImpl.java:1619) >>>> at >>>> org.apache.openjpa.persistence.PersistenceProductDerivation$ConfigurationProviderImpl.setInto(PersistenceProductDerivation.java:692) >>>> at >>>> org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.<init>(PersistenceProviderImpl.java:294) >>>> at >>>> org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.<init>(PersistenceProviderImpl.java:287) >>>> at >>>> org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:169) >>>> at >>>> org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:65) >>>> at >>>> org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.createEntityManagerFactories(EntityManagerFactoryManager.java:263) >>>> at >>>> org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.bundleStateChange(EntityManagerFactoryManager.java:153) >>>> at >>>> org.apache.aries.jpa.container.impl.PersistenceBundleManager.modifiedBundle(PersistenceBundleManager.java:283) >>>> at >>>> org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:453) >>>> at >>>> org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:237) >>>> at >>>> org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:413) >>>> at >>>> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807) >>>> at >>>> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729) >>>> at >>>> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610) >>>> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3724) >>>> at org.apache.felix.framework.Felix.access$600(Felix.java:80) >>>> at >>>> org.apache.felix.framework.Felix$FelixResolver.fireResolvedEvents(Felix.java:4263) >>>> at >>>> org.apache.felix.framework.Felix$FelixResolver.resolve(Felix.java:4028) >>>> at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3402) >>>> at org.apache.felix.framework.Felix.startBundle(Felix.java:1719) >>>> at org.apache.felix.framework.Felix.updateBundle(Felix.java:2077) >>>> at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:940) >>>> at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:927) >>>> at >>>> org.apache.karaf.shell.osgi.UpdateBundle.doExecute(UpdateBundle.java:37) >>>> at >>>> org.apache.karaf.shell.osgi.BundleCommand.doExecute(BundleCommand.java:42) >>>> at >>>> org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38) >>>> at >>>> org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35) >>>> at >>>> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78) >>>> at >>>> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474) >>>> at >>>> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400) >>>> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) >>>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183) >>>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120) >>>> at >>>> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:79) >>>> at >>>> org.apache.karaf.shell.console.jline.Console.run(Console.java:180) >>>> at java.lang.Thread.run(Thread.java:680) >>>> Caused by: java.lang.ClassNotFoundException: >>>> org.apache.log4j.LogManager not found by >>>> org.ops4j.pax.logging.pax-logging-api [3] >>>> at >>>> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787) >>>> at >>>> org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71) >>>> at >>>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768) >>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248) >>>> at >>>> org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:645) >>>> at >>>> org.apache.felix.framework.resolver.WireImpl.getClass(WireImpl.java:99) >>>> at >>>> org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1390) >>>> at >>>> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:722) >>>> at >>>> org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71) >>>> at >>>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768) >>>> >>>> Is it planned that the bundle org.ops4j.pax.logging.pax-logging-api >>>> exports this class >>>> http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/LogManager.html >>>> it in a next version ? >>>> >>>> Regards, >>>> >>>> Charles Moulliard >>>> >>>> Sr. Principal Solution Architect - FuseSource >>>> Apache Committer >>>> >>>> Blog : http://cmoulliard.blogspot.com >>>> Twitter : http://twitter.com/cmoulliard >>>> Linkedin : http://www.linkedin.com/in/charlesmoulliard >>>> Skype: cmoulliard >>>> >>> >>> >>> >>> -- >>> Cheers, >>> Guillaume Nodet >>> ------------------------ >>> Blog: http://gnodet.blogspot.com/ >>> ------------------------ >>> Open Source SOA >>> http://fusesource.com >>> >> > > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > ------------------------ > Open Source SOA > http://fusesource.com >
