Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Creation of logback LoggerContext within library fails
Creation of logback LoggerContext within library fails [message #989761] Fri, 07 December 2012 10:58 Go to next message
Jean-Pierre Bergamin is currently offline Jean-Pierre Bergamin
Messages: 51
Registered: March 2011
Location: Z├╝rich, CH
Member
Hello Virgo users

We are using neo4j embedded. The neo4j-kernel tries to create its own instance of a LogBack LoggerContext (see here). This fails with the stacktrace show below. It seems that neo4j and virgo still are logging successfully.

I'm a bit helpless how to interpret this error. Would neo4j handle the logger creation differently? Do I have to add something to the neo4j bundle so that the logger creation is successful?


Best regards,
James

BTW: We are using Virgo 3.0.3.


[2012-12-07 16:40:36.323] ERROR region-dm-11 System.err Failed to instantiate [ch.qos.logback.classic.LoggerContext]
[2012-12-07 16:40:36.323] ERROR region-dm-11 System.err Reported exception:
[2012-12-07 16:40:36.323] ERROR region-dm-11 System.err org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.eclipse.virgo.medic.log.impl.logback.DelegatingContextSelector in KernelBundleClassLoader: [bundle=org.neo4j.neo4j-osgi-bundle_1.9.0.M01]
[2012-12-07 16:40:36.324] ERROR region-dm-11 System.err at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:138)
[2012-12-07 16:40:36.325] ERROR region-dm-11 System.err at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
[2012-12-07 16:40:36.325] ERROR region-dm-11 System.err at java.lang.Class.forName0(Native Method)
[2012-12-07 16:40:36.325] ERROR region-dm-11 System.err at java.lang.Class.forName(Class.java:169)
[2012-12-07 16:40:36.325] ERROR region-dm-11 System.err at ch.qos.logback.core.util.Loader.loadClass(Loader.java:192)
[2012-12-07 16:40:36.325] ERROR region-dm-11 System.err at ch.qos.logback.classic.util.ContextSelectorStaticBinder.dynamicalContextSelector(ContextSelectorStaticBinder.java:97)
[2012-12-07 16:40:36.325] ERROR region-dm-11 System.err at ch.qos.logback.classic.util.ContextSelectorStaticBinder.init(ContextSelectorStaticBinder.java:72)
[2012-12-07 16:40:36.326] ERROR region-dm-11 System.err at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:89)
[2012-12-07 16:40:36.326] ERROR region-dm-11 System.err at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:54)
[2012-12-07 16:40:36.326] ERROR region-dm-11 System.err at org.neo4j.kernel.InternalAbstractGraphDatabase.createStringLogger(InternalAbstractGraphDatabase.java:737)
[2012-12-07 16:40:36.326] ERROR region-dm-11 System.err at org.neo4j.kernel.InternalAbstractGraphDatabase.create(InternalAbstractGraphDatabase.java:289)
[2012-12-07 16:40:36.327] ERROR region-dm-11 System.err at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:233)
[2012-12-07 16:40:36.327] ERROR region-dm-11 System.err at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:86)
[2012-12-07 16:40:36.327] ERROR region-dm-11 System.err at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:74)
[2012-12-07 16:40:36.327] ERROR region-dm-11 System.err at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[2012-12-07 16:40:36.327] ERROR region-dm-11 System.err at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[2012-12-07 16:40:36.328] ERROR region-dm-11 System.err at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[2012-12-07 16:40:36.328] ERROR region-dm-11 System.err at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
[2012-12-07 16:40:36.328] ERROR region-dm-11 System.err at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
[2012-12-07 16:40:36.328] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:108)
[2012-12-07 16:40:36.328] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280)
[2012-12-07 16:40:36.329] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1002)
[2012-12-07 16:40:36.329] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:906)
[2012-12-07 16:40:36.329] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:484)
[2012-12-07 16:40:36.330] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
[2012-12-07 16:40:36.330] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
[2012-12-07 16:40:36.330] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
[2012-12-07 16:40:36.330] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
[2012-12-07 16:40:36.331] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
[2012-12-07 16:40:36.331] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848)
[2012-12-07 16:40:36.331] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
[2012-12-07 16:40:36.331] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
[2012-12-07 16:40:36.332] ERROR region-dm-11 System.err at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:551)
[2012-12-07 16:40:36.332] ERROR region-dm-11 System.err at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
[2012-12-07 16:40:36.332] ERROR region-dm-11 System.err at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)
[2012-12-07 16:40:36.333] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1073)
[2012-12-07 16:40:36.333] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
[2012-12-07 16:40:36.333] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
[2012-12-07 16:40:36.333] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
[2012-12-07 16:40:36.334] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
[2012-12-07 16:40:36.334] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
[2012-12-07 16:40:36.334] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
[2012-12-07 16:40:36.334] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:353)
[2012-12-07 16:40:36.335] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:982)
[2012-12-07 16:40:36.335] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:878)
[2012-12-07 16:40:36.335] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getSingletonFactoryBeanForTypeCheck(AbstractAutowireCapableBeanFactory.java:734)
[2012-12-07 16:40:36.335] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:665)
[2012-12-07 16:40:36.335] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:518)
[2012-12-07 16:40:36.336] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:319)
[2012-12-07 16:40:36.336] ERROR region-dm-11 System.err at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:185)
[2012-12-07 16:40:36.336] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:833)
[2012-12-07 16:40:36.336] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
[2012-12-07 16:40:36.337] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
[2012-12-07 16:40:36.337] ERROR region-dm-11 System.err at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
[2012-12-07 16:40:36.337] ERROR region-dm-11 System.err at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
[2012-12-07 16:40:36.337] ERROR region-dm-11 System.err at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)
[2012-12-07 16:40:36.338] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1073)
[2012-12-07 16:40:36.338] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
[2012-12-07 16:40:36.338] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
[2012-12-07 16:40:36.339] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
[2012-12-07 16:40:36.339] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
[2012-12-07 16:40:36.339] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
[2012-12-07 16:40:36.339] ERROR region-dm-11 System.err at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
[2012-12-07 16:40:36.339] ERROR region-dm-11 System.err at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075)
[2012-12-07 16:40:36.340] ERROR region-dm-11 System.err at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.registerBeanPostProcessors(AbstractDelegatedExecutionApplicationContext.java:551)
[2012-12-07 16:40:36.340] ERROR region-dm-11 System.err at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.registerBeanPostProcessors(AbstractDelegatedExecutionApplicationContext.java:486)
[2012-12-07 16:40:36.340] ERROR region-dm-11 System.err at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:336)
[2012-12-07 16:40:36.341] ERROR region-dm-11 System.err at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
[2012-12-07 16:40:36.341] ERROR region-dm-11 System.err at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
[2012-12-07 16:40:36.341] ERROR region-dm-11 System.err at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
[2012-12-07 16:40:36.342] ERROR region-dm-11 System.err at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
[2012-12-07 16:40:36.342] ERROR region-dm-11 System.err at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[2012-12-07 16:40:36.342] ERROR region-dm-11 System.err at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[2012-12-07 16:40:36.342] ERROR region-dm-11 System.err at java.lang.Thread.run(Thread.java:662)
[2012-12-07 16:40:36.343] ERROR region-dm-11 System.err Caused by: java.lang.ClassNotFoundException: org.eclipse.virgo.medic.log.impl.logback.DelegatingContextSelector
[2012-12-07 16:40:36.343] ERROR region-dm-11 System.err at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
[2012-12-07 16:40:36.343] ERROR region-dm-11 System.err at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
[2012-12-07 16:40:36.343] ERROR region-dm-11 System.err at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
[2012-12-07 16:40:36.344] ERROR region-dm-11 System.err at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
[2012-12-07 16:40:36.344] ERROR region-dm-11 System.err at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:134)
[2012-12-07 16:40:36.344] ERROR region-dm-11 System.err ... 73 more



Best regards,
James
Re: Creation of logback LoggerContext within library fails [message #991321 is a reply to message #989761] Tue, 18 December 2012 09:18 Go to previous message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
You could try hacking the manifest of the medic core bundle so that it exports the package org.eclipse.virgo.medic.log.impl.logback and then import that package into org.neo4j.neo4j-osgi-bundle (see the FAQ if you want to avoid hacking neo4j). That would at least give us a clue that what you are trying to do is feasible with a suitably refactored medic core (to move DCS to an exported package).
Previous Topic:Virgo Web Bundle Help
Next Topic:Exact meaning of 'services in use'
Goto Forum:
  


Current Time: Tue Jul 22 21:45:05 EDT 2014

Powered by FUDForum. Page generated in 0.02065 seconds