org.osgi.service.blueprint.container.ComponentDefinitionException

Unable to initialize bean connectionFactory1

Samebug tips8

tip

You might've forgot to add a dependency or it's written wrong. Also, you might be using incompatible versions of Java and Hibernate. More on this here: https://goo.gl/SjSlRA

tip

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web13597

  • Stack trace

    • org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to initialize bean connectionFactory1 at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[18:org.apache.aries.blueprint.core:1.4.3] at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_71] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:682)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:377)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:294)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:263)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:253)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[13:org.apache.aries.util:1.1.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[13:org.apache.aries.util:1.1.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[13:org.apache.aries.util:1.1.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[13:org.apache.aries.util:1.1.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[13:org.apache.aries.util:1.1.0] at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1127)[org.apache.felix.framework-4.4.1.jar:] at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:696)[org.apache.felix.framework-4.4.1.jar:] at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:484)[org.apache.felix.framework-4.4.1.jar:] at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4429)[org.apache.felix.framework-4.4.1.jar:] at org.apache.felix.framework.Felix.startBundle(Felix.java:2100)[org.apache.felix.framework-4.4.1.jar:] at org.apache.felix.framework.Felix.updateBundle(Felix.java:2412)[org.apache.felix.framework-4.4.1.jar:] at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:994)[org.apache.felix.framework-4.4.1.jar:] at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:981)[org.apache.felix.framework-4.4.1.jar:] at org.apache.karaf.shell.osgi.UpdateBundle.doExecute(UpdateBundle.java:37)[23:org.apache.karaf.shell.osgi:2.4.3] at org.apache.karaf.shell.osgi.BundleCommand.doExecute(BundleCommand.java:41)[23:org.apache.karaf.shell.osgi:2.4.3] at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[21:org.apache.karaf.shell.console:2.4.3] at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[21:org.apache.karaf.shell.console:2.4.3] at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[21:org.apache.karaf.shell.console:2.4.3] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[21:org.apache.karaf.shell.console:2.4.3] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[21:org.apache.karaf.shell.console:2.4.3] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[21:org.apache.karaf.shell.console:2.4.3] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[21:org.apache.karaf.shell.console:2.4.3] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[21:org.apache.karaf.shell.console:2.4.3] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)[21:org.apache.karaf.shell.console:2.4.3] at org.apache.karaf.shell.console.jline.Console.run(Console.java:195)[21:org.apache.karaf.shell.console:2.4.3] at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)[21:org.apache.karaf.shell.console:2.4.3] Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: fr.dyade.aaa.jndi2.client.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: fr.dyade.aaa.jndi2.client.NamingContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)[:1.7.0_71] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)[:1.7.0_71] at javax.naming.InitialContext.init(InitialContext.java:242)[:1.7.0_71] at javax.naming.InitialContext.<init>(InitialContext.java:216)[:1.7.0_71] at org.springframework.jndi.JndiTemplate.createInitialContext(JndiTemplate.java:136)[78:org.apache.servicemix.bundles.spring-context:3.2.11.RELEASE_1] at org.springframework.jndi.JndiTemplate.getContext(JndiTemplate.java:103)[78:org.apache.servicemix.bundles.spring-context:3.2.11.RELEASE_1] at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)[78:org.apache.servicemix.bundles.spring-context:3.2.11.RELEASE_1] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)[78:org.apache.servicemix.bundles.spring-context:3.2.11.RELEASE_1] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)[78:org.apache.servicemix.bundles.spring-context:3.2.11.RELEASE_1] at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95) at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105) at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:231) at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:217) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_71] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_71] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_71] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_71] at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[18:org.apache.aries.blueprint.core:1.4.3] at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[18:org.apache.aries.blueprint.core:1.4.3] ... 39 more Caused by: java.lang.ClassNotFoundException: fr.dyade.aaa.jndi2.client.NamingContextFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:366)[:1.7.0_71] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)[:1.7.0_71] at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_71] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)[:1.7.0_71] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)[:1.7.0_71] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)[:1.7.0_71] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_71] at java.lang.Class.forName0(Native Method)[:1.7.0_71] at java.lang.Class.forName(Class.java:274)[:1.7.0_71] at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:72)[:1.7.0_71] at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:61)[:1.7.0_71] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)[:1.7.0_71] ... 58 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    1191 more bugmates