1 Reply Latest reply on Nov 19, 2012 10:32 AM by Constantine Vasilyev

    collection-type bean properties in Blueprint

    Constantine Vasilyev Newbie

      In my Blueprint config file,  have a bean definition that used to cause no issues is Spring:

       

       

           

       

      Note the last property named "arguments" that is a list/collection of objects. While it works fine in Spring, Blueprint throws an exception stating that the string value (successfully resolved from a property file) cannot be cast to java [Ljava.lang.Object:

       

      Caused by: java.lang.Exception: Unable to convert value 13F0EA1F49DA6D3BA8AA69A7408FC2C3 to type class [Ljava.lang.Object;. Type class [Ljava.lang.Object; is an interface or an abstract class

      at org.apache.aries.blueprint.container.AggregateConverter.createObject(AggregateConverter.java:298)[9:org.apache.aries.blueprint:0.3.2]

      at org.apache.aries.blueprint.container.AggregateConverter.convertFromString(AggregateConverter.java:292)[9:org.apache.aries.blueprint:0.3.2]

      at org.apache.aries.blueprint.container.AggregateConverter.convert(AggregateConverter.java:162)[9:org.apache.aries.blueprint:0.3.2]

      at org.apache.aries.blueprint.container.BlueprintRepository.convert(BlueprintRepository.java:373)[9:org.apache.aries.blueprint:0.3.2]

      at org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.convert(ReflectionUtils.java:322)[9:org.apache.aries.blueprint:0.3.2]

      at org.apache.aries.blueprint.utils.ReflectionUtils$MethodPropertyDescriptor.internalSet(ReflectionUtils.java:555)[9:org.apache.aries.blueprint:0.3.2]

      at org.apache.aries.blueprint.utils.ReflectionUtils$PropertyDescriptor.set(ReflectionUtils.java:306)[9:org.apache.aries.blueprint:0.3.2]

      at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:819)[9:org.apache.aries.blueprint:0.3.2]

      ... 22 more

       

       

      Does Blueprint not support collection-type properties in bean definitions? Is there a way around it?

       

      Thanks,

      CV