Property injection into blueprint fails with error message - Caused by: java.lang.NullPointerException

Solution Verified - Updated -

Issue

  • Can you please tell me why properties are not being injected into my blueprint. I have attached my blueprint, jar, error and (dummy) property files (place in /etc).
  • Below is the error received
2015-09-25 11:48:39,104 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | ?                                   ? | 21 - org.apache.aries.blueprint.core - 1.4.2 | Unable to start blueprint container for bundle datasour
ce-datasync
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to initialize bean ds-datasync-env
        at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[21:org.apache.aries.blueprint.core:1.4.2]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_51]
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:230)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:155)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:528)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:361)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[21:org.apache.aries.blueprint.core:1.4.2]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_51]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_51]
        at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[21:org.apache.aries.blueprint.core:1.4.2]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_51]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_51]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_51]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_51]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_51]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_51]
        at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]
Caused by: java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:514)[:1.7.0_51]
        at org.apache.aries.blueprint.compendium.cm.CmPropertyPlaceholder.init(CmPropertyPlaceholder.java:100)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
        at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
        at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[21:org.apache.aries.blueprint.core:1.4.2]
        at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[21:org.apache.aries.blueprint.core:1.4.2]
        ... 22 more

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content