Affects Version/s: 2.19.4, 2.20.2
Mac OSX, Karaf 4.2.5
The error "name is already instanciated (sic) as null and cannot be removed" is thrown when configuring a component in Blueprint using property placeholders.
I noticed when trying to migrate my project to Camel 2.20.2 (from 2.17.4)
The bean is referenced in a Camel route:
org.osgi.service.blueprint.container.ComponentDefinitionException: Name audit-log-reaper-quartz is already as null and cannot be removed.
at org.apache.aries.blueprint.container.BlueprintRepository.removeRecipe(BlueprintRepository.java:131) [38:org.apache.aries.blueprint.core:1.8.3]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.updateUninstantiatedRecipes(BlueprintContainerImpl.java:572) [38:org.apache.aries.blueprint.core:1.8.3]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:559) [38:org.apache.aries.blueprint.core:1.8.3]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:394) [38:org.apache.aries.blueprint.core:1.8.3]
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:275) [38:org.apache.aries.blueprint.core:1.8.3]
Removing the property placeholder fixes the issue:
According to Guillaume Nodet, this seems to have been introduced by this pull request:
Solution proposed by Guillaume Nodet is to change line 1056 of /camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java
I tested this change locally and it seems to work, however I don't know if this can cause other problems.