org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.NullPointerException

Apache's JIRA Issue Tracker | Vladimir Kulev | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The simple jar bundle (attached) with blueprint below deploys successfully, but triggers NPE on bundle file update or manual OSGi bundle refresh. Surprisingly, deploying blueprint.xml directly (instead of a jar bundle) works fine. {code:xml} <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"> <cm:property-placeholder persistent-id="com.example.test"> <cm:default-properties> <cm:property name="test" value="10"/> </cm:default-properties> </cm:property-placeholder> <camelContext xmlns="http://camel.apache.org/schema/blueprint" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd"> <route> <from uri="direct:a"/> <to uri="direct:b"/> </route> </camelContext> </blueprint> {code} Exception stacktrace: {noformat} 16:01:02,317 | INFO | mix-5.0.1/deploy | fileinstall | 6 - org.apache.felix.fileinstall - 3.2.8 | Updated /home/lightoze/work/3rd/apache-servicemix-5.0.1/deploy/test-bundle.jar 16:01:02,339 | WARN | mix-5.0.1/deploy | BeanRecipe | 7 - org.apache.aries.blueprint.core - 1.4.0 | Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null 16:01:02,340 | ERROR | mix-5.0.1/deploy | BlueprintContainerImpl | 7 - org.apache.aries.blueprint.core - 1.4.0 | Unable to start blueprint container for bundle test-bundle.jar org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.NullPointerException at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:122)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.4.0] at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_55] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.4.0] at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_55] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:230)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:155)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:527)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:361)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:245)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:235)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[10:org.apache.aries.util:1.1.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[10:org.apache.aries.util:1.1.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[10:org.apache.aries.util:1.1.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[10:org.apache.aries.util:1.1.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[10:org.apache.aries.util:1.1.0] at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.0.3.jar:] at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.felix.framework-4.0.3.jar:] at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.framework-4.0.3.jar:] at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4244)[org.apache.felix.framework-4.0.3.jar:] at org.apache.felix.framework.Felix.startBundle(Felix.java:1923)[org.apache.felix.framework-4.0.3.jar:] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1263)[6:org.apache.felix.fileinstall:3.2.8] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1235)[6:org.apache.felix.fileinstall:3.2.8] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1224)[6:org.apache.felix.fileinstall:3.2.8] at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:519)[6:org.apache.felix.fileinstall:3.2.8] at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:308)[6:org.apache.felix.fileinstall:3.2.8] Caused by: java.lang.NullPointerException at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432)[org.apache.felix.framework-4.0.3.jar:] at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)[org.apache.felix.framework-4.0.3.jar:] at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843) at java.lang.ClassLoader.loadClass(ClassLoader.java:412)[:1.7.0_55] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_55] at java.lang.Class.forName0(Native Method)[:1.7.0_55] at java.lang.Class.forName(Class.java:270)[:1.7.0_55] at org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.isInvalid(ProxyClassLoader.java:109)[12:org.apache.aries.proxy.impl:1.0.2] at org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:84)[12:org.apache.aries.proxy.impl:1.0.2] at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:72)[12:org.apache.aries.proxy.impl:1.0.2] at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)[12:org.apache.aries.proxy.impl:1.0.2] at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)[12:org.apache.aries.proxy.impl:1.0.2] at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:338)[7:org.apache.aries.blueprint.core:1.4.0] at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:106)[7:org.apache.aries.blueprint.core:1.4.0] ... 36 more {noformat}

    Apache's JIRA Issue Tracker | 3 years ago | Vladimir Kulev
    org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.NullPointerException
  2. 0

    ServiceMix 5.1 example bundle fails after update

    Stack Overflow | 3 years ago | Bertrand
    org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.NullPointerException
  3. 0

    [jira] [Created] (ARIES-1151) NullPointerException in BundleWiringImpl.findClassOrResourceByDelegation

    aries-dev | 3 years ago | Valentin Mayamsin (JIRA)
    org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [jira] [Updated] (ARIES-1151) NullPointerException in BundleWiringImpl.findClassOrResourceByDelegation

    aries-dev | 3 years ago | Valentin Mayamsin (JIRA)
    org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.NullPointerException
  6. 0

    Camel Development - property-placeholder + OSGI

    nabble.com | 8 months ago
    org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.NullPointerException
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation()
  2. Apache Felix Framework
    BundleWiringImpl$BundleClassLoader.loadClass
    1. org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432)[org.apache.felix.framework-4.0.3.jar:]
    2. org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)[org.apache.felix.framework-4.0.3.jar:]
    3. org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
    3 frames
  3. Java RT
    Class.forName
    1. java.lang.ClassLoader.loadClass(ClassLoader.java:412)[:1.7.0_55]
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_55]
    3. java.lang.Class.forName0(Native Method)[:1.7.0_55]
    4. java.lang.Class.forName(Class.java:270)[:1.7.0_55]
    4 frames
  4. Apache Aries Proxy Service
    AbstractProxyManager.createDelegatingProxy
    1. org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.isInvalid(ProxyClassLoader.java:109)[12:org.apache.aries.proxy.impl:1.0.2]
    2. org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:84)[12:org.apache.aries.proxy.impl:1.0.2]
    3. org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:72)[12:org.apache.aries.proxy.impl:1.0.2]
    4. org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)[12:org.apache.aries.proxy.impl:1.0.2]
    5. org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)[12:org.apache.aries.proxy.impl:1.0.2]
    5 frames
  5. Apache Aries Blueprint Core
    AbstractRecipe$1.call
    1. org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:338)[7:org.apache.aries.blueprint.core:1.4.0]
    2. org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:106)[7:org.apache.aries.blueprint.core:1.4.0]
    3. org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.4.0]
    3 frames
  6. Java RT
    FutureTask.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_55]
    1 frame
  7. Apache Aries Blueprint Core
    AbstractRecipe$1.call
    1. org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.4.0]
    2. org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)[7:org.apache.aries.blueprint.core:1.4.0]
    3. org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)[7:org.apache.aries.blueprint.core:1.4.0]
    4. org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)[7:org.apache.aries.blueprint.core:1.4.0]
    5. org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[7:org.apache.aries.blueprint.core:1.4.0]
    6. org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[7:org.apache.aries.blueprint.core:1.4.0]
    7. org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[7:org.apache.aries.blueprint.core:1.4.0]
    7 frames
  8. Java RT
    FutureTask.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_55]
    1 frame
  9. Apache Aries Blueprint Core
    BlueprintExtender.modifiedBundle
    1. org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[7:org.apache.aries.blueprint.core:1.4.0]
    2. org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[7:org.apache.aries.blueprint.core:1.4.0]
    3. org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:230)[7:org.apache.aries.blueprint.core:1.4.0]
    4. org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:155)[7:org.apache.aries.blueprint.core:1.4.0]
    5. org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:527)[7:org.apache.aries.blueprint.core:1.4.0]
    6. org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:361)[7:org.apache.aries.blueprint.core:1.4.0]
    7. org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[7:org.apache.aries.blueprint.core:1.4.0]
    8. org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276)[7:org.apache.aries.blueprint.core:1.4.0]
    9. org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:245)[7:org.apache.aries.blueprint.core:1.4.0]
    10. org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:235)[7:org.apache.aries.blueprint.core:1.4.0]
    10 frames
  10. Apache Aries Util
    BundleHookBundleTracker$BundleEventHook.event
    1. org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[10:org.apache.aries.util:1.1.0]
    2. org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[10:org.apache.aries.util:1.1.0]
    3. org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[10:org.apache.aries.util:1.1.0]
    4. org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[10:org.apache.aries.util:1.1.0]
    5. org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[10:org.apache.aries.util:1.1.0]
    5 frames
  11. Apache Felix Framework
    BundleImpl.start
    1. org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.0.3.jar:]
    2. org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)[org.apache.felix.framework-4.0.3.jar:]
    3. org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)[org.apache.felix.framework-4.0.3.jar:]
    4. org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4244)[org.apache.felix.framework-4.0.3.jar:]
    5. org.apache.felix.framework.Felix.startBundle(Felix.java:1923)[org.apache.felix.framework-4.0.3.jar:]
    6. org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
    6 frames
  12. Apache Felix File Install
    DirectoryWatcher.run
    1. org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1263)[6:org.apache.felix.fileinstall:3.2.8]
    2. org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1235)[6:org.apache.felix.fileinstall:3.2.8]
    3. org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1224)[6:org.apache.felix.fileinstall:3.2.8]
    4. org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:519)[6:org.apache.felix.fileinstall:3.2.8]
    5. org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:308)[6:org.apache.felix.fileinstall:3.2.8]
    5 frames