This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

org.springframework.osgi.service.importer.support.OsgiServiceCollectionProxyFactoryBean not foundPage Title Module

org.springframework.osgi.service.importer.support. OsgiServiceCollectionProxyFactoryBean not found

Hi,
There is a misunderstanding on how Autowired works with collections and arrays. See here:
http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-autowired-annotation
Basically when injecting an array or collection of type X, Spring will look for all beans of type X and it will inject those rather then injection a bean that is an array or collection.

Comment

org.springframework.osgi.service.importer.support. OsgiServiceCollectionProxyFactoryBean not found

Right, I understand. So it is a limitation of Spring autowiring feature which works for simple beans only, not for maps, sets, etc. It means that even beans defined using <util:map /> or <util:set /> cannot be autowired.