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.

<osgi:set> problems

I've been trying to use dm Server and declarative services to provide an SPI, bundles present a service to a host bundle which has a selection mechanism and facade for the rest of the application.

I'm seeing:

Code:

Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'memberType' of bean class [org.springframework.osgi.service.importer.support.OsgiServiceCollectionProxyFactoryBean]: Bean property 'memberType' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1012)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:857)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1338)

trying to deploy the host bundle, before any services are added to it.

This is very odd. Please could you capture a minimal test bundle that reproduces the problem. It should export the interface com.othellonames.orp.tld, otherwise you'll need a second bundle to export that. Then raise a JIRA issue and attach the bundle so we can take a look.

(Please note for the record that this example is using Spring DM and not Declarative Services.)

Comment

No problem. I'm glad you've got something that works. If you incrementally evolve it towards the failing system, the issue should stick out like a sort thumb when you make the incremental change that causes it to come back.