Dear Karaf members, Our Karaf application encounters a strange behavior at the first launch using the karaf/bin/start script: the application is not fully started due to exceptions. The error only happens during the first launch. If we start the application afterwards using karaf/bin/start it works perfectly fine. The error we have is that our constants defined in .cfg files are not replaced by their value at the first launch using bin/start.
Everything works fine using bin/karaf the first time. Here is the exception (I changed constant name and classes): Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: Error setting property: PropertyDescriptor <name: MyConstant, getter: class mypackage. MyClass.getMaxValue(), setter: [class mypackage.MyClass.setMyConstant(float)] at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:941)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[19:org.apache.aries.blueprint.core:1.4.1] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_40-ea] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[19:org.apache.aries.blueprint.core:1.4.1] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_40-ea] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[19:org.apache.aries.blueprint.core:1.4.1] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_40-ea] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.di.CollectionRecipe.internalCreate(CollectionRecipe.java:90)[19:org.apache.aries.blueprint.core:1.4.1] ... 22 more Caused by: java.lang.NumberFormatException: For input string: "$(MyConstant)" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)[:1.8.0_40-ea] at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)[:1.8.0_40-ea] at java.lang.Float.parseFloat(Float.java:451)[:1.8.0_40-ea] at java.lang.Float.valueOf(Float.java:416)[:1.8.0_40-ea] at org.apache.aries.blueprint.container.AggregateConverter.convertFromString(AggregateConverter.java:287)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.AggregateConverter.convert(AggregateConverter.java:174)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BlueprintRepository.convert(BlueprintRepository.java:402)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.convert(ReflectionUtils.java:394)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.utils.ReflectionUtils$MethodPropertyDescriptor.internalSet(ReflectionUtils.java:628)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.set(ReflectionUtils.java:378)[19:org.apache.aries.blueprint.core:1.4.1] at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:939)[19:org.apache.aries.blueprint.core:1.4.1] KARAF VERSION : 3.0.2-SNAPSHOT (last week) Using karaf feature and assembly Thanks ! Regards ________________________________ Sébastien Deries Tel. : + 33 (0)4 92 96 31 52 sebastien.der...@thalesgroup.com<mailto:sebastien.der...@thalesgroup.com>