I'm not too sure what this blueprint means. The first line is <bean id="bean1" class="java.util.Map"> which asks to instantiate an interface which is not possible. Then, this bean is asked to contain a <map> but the injection mode is not specified (syntax); should be argument (constructor) or property (setXXX).
Are you sure your XML has blueprint compliant syntax? JP -----Message d'origine----- De : cbiava [mailto:[email protected]] Envoyé : mardi 28 janvier 2014 10:55 À : [email protected] Objet : Import Map via blueprint container Hello, I would like to inject a map into karaf using a blueprint container. But when I try using <map> identifier I have the following error : Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'Tkey'. One of '{"http://www.osgi.org/xmlns/blueprint/v1.0.0":description, "http://www.osgi.org/xmlns/blueprint/v1.0.0":arg ument, "http://www.osgi.org/xmlns/blueprint/v1.0.0":property, WC[##other:"http://www.osgi.org/xmlns/blueprint/v1.0.0"]}' is expected. The blueprint xml is the following: <?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> <bean id="bean1" class="java.util.Map"> <map> <entry key="C1"> <map> <entry key="key1">val1</entry> <entry key="key2">val2</entry> <entry key="key3">val3</entry> <entry key="formats"> <map> <entry key="Fkey1">Fvak1</entry> <entry key="Fkey2">Fvak2</entry> <entry key="Fkey3">Fvak3</entry> </map> </entry> </map> </entry> </map> </bean> <service interface="java.util.Map" ref="bean1"> <service-properties> <entry key="osgi.jndi.service.name">config/beanC</entry> </service-properties> </service> </blueprint> Thanks in advance for helping Christophe -- View this message in context: http://karaf.922171.n3.nabble.com/Import-Map-via-blueprint-container-tp4031365.html Sent from the Karaf - User mailing list archive at Nabble.com.
