Do you have the derby bundle installed ? Can you check the dynamic import of the blueprint bundle ?
Regards JB On 11/06/2018 12:35, ceugster wrote: > HI > in the meantime I did a step back following the tutorial in enterprise osgi > in action by Holly Cummins and Timothy Ward. I stuck while creating a data > source in the old fashion blueprint way (using xml). I get a stack trace > (see below) when registering the data source: > > karaf@root()> diag 241 > Fancyfoods Derby Datasource (241) > --------------------------------- > Status: Failure > Declarative Services > Blueprint > 11.06.18 12:18 > Exception: > Unable to load class org.apache.derby.jdbc.EmbeddedDataSource from recipe > BeanRecipe[name='derbyDataSource'] > org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to > load class org.apache.derby.jdbc.EmbeddedDataSource from recipe > BeanRecipe[name='derbyDataSource'] > at > org.apache.aries.blueprint.di.AbstractRecipe.doLoadType(AbstractRecipe.java:196) > at > org.apache.aries.blueprint.di.AbstractRecipe.loadType(AbstractRecipe.java:162) > at > org.apache.aries.blueprint.container.BeanRecipe.loadClass(BeanRecipe.java:251) > at > org.apache.aries.blueprint.container.BeanRecipe.getType(BeanRecipe.java:772) > at > org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromType(BeanRecipe.java:342) > at > org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:283) > at > org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:685) > at > org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:666) > at > org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90) > at > org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:360) > at > org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:190) > at > org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:716) > at > org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:413) > at > org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278) > at > org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:299) > at > org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:268) > at > org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:264) > at > org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:254) > at > org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500) > at > org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433) > at > org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725) > at > org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463) > at > org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422) > at > org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179) > at > org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730) > at > org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485) > at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) > at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) > at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373) > at > org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308) > at java.lang.Thread.run(Thread.java:748) > Caused by: java.lang.ClassNotFoundException: > org.apache.derby.jdbc.EmbeddedDataSource not found by > fancyfoods.datasource.derby [241] > at > org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639) > at > org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) > at > org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1927) > at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:978) > at > org.apache.aries.blueprint.container.BlueprintContainerImpl.loadClass(BlueprintContainerImpl.java:450) > at > org.apache.aries.blueprint.container.BlueprintRepository.loadClass(BlueprintRepository.java:524) > at > org.apache.aries.blueprint.container.GenericType.parse(GenericType.java:135) > at > org.apache.aries.blueprint.di.AbstractRecipe.doLoadType(AbstractRecipe.java:169) > ... 32 more > > thought I added an apache derby driver > > karaf@root()> list > START LEVEL 100 , List Threshold: 50 > ID │ State │ Lvl │ Version │ Name > ────┼──────────┼─────┼───────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── > 21 │ Active │ 80 │ 4.2.0 │ Apache Karaf :: OSGi Services > :: Event > 62 │ Active │ 80 │ 4.6.0 │ Apache XBean OSGI Bundle > Utilities > 63 │ Active │ 80 │ 4.6.0 │ Apache XBean :: Classpath > Resource Finder > 157 │ Active │ 80 │ 3.1.0.v201410161800 │ Servlet API Bundle > 183 │ Active │ 80 │ 1.0.1 │ Apache Aries Blueprint > Annotation API > 208 │ Active │ 80 │ 1.0.0 │ Apache Aries JNDI Bundle > 216 │ Active │ 80 │ 1.9.2.1 │ Apache ServiceMix :: Bundles > :: jasypt > 217 │ Active │ 80 │ 1.2.0 │ OPS4J Pax JDBC Generic Driver > Extender > 218 │ Active │ 80 │ 1.2.0 │ OPS4J Pax JDBC Config > 219 │ Active │ 80 │ 1.2.0 │ OPS4J Pax JDBC Pooling > Support Base > 220 │ Active │ 80 │ 1.0.0.201505202023 │ > org.osgi:org.osgi.service.jdbc > 222 │ Active │ 80 │ 4.2.0 │ Apache Karaf :: JDBC :: Core > 223 │ Active │ 80 │ 1.2.0 │ OPS4J Pax JDBC Apache Derby > Driver Adapter > 236 │ Active │ 80 │ 1.0.0 │ Fancyfoods Web Bundle, > Fragments: 240, 242 > 237 │ Active │ 80 │ 1.0.0 │ Fancyfoods Departement > Chocolate > 238 │ Active │ 80 │ 1.0.0 │ Fancyfoods Api Bundle > 239 │ Active │ 80 │ 1.0.0 │ Fancyfoods Business > 240 │ Resolved │ 80 │ 1.0.0 │ Fancyfoods French language > resources, Hosts: 236 > 241 │ Failure │ 80 │ 1.0.0 │ Fancyfoods Derby Datasource > 242 │ Resolved │ 80 │ 1.0.0 │ Fancyfoods Ressourcen > deutscher Sprache, Hosts: 236 > 244 *│ Active │ 80 │ 10.13.1000001.1765088 │ Apache Derby 10.13* > 245 │ Active │ 80 │ 1.0.1 │ Apache Aries Blueprint Web > OSGI > karaf@root()> > > I know that derby provides the classes in question (EmbeddedDataSource) > > What goes wrong here? Any help is appreciated! > > Christian > > > > > > -- > Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html > -- Jean-Baptiste Onofré [email protected] http://blog.nanthrax.net Talend - http://www.talend.com
