cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Smyth <andrea.sm...@iona.com>
Subject Re: Configuration question
Date Thu, 05 Oct 2006 18:56:15 GMT
Hi Michael

you need to register property editors for these complex types. By 
default, Spring can only handle primitive types.
You can use Spring itself to do that, i.e. simply provide a 
META-INF/cxf/cxf-property-editors.xml file similar to the one you find 
in  the cxf-rt-transports-http module.

Andrea.

>
>org.springframework.beans.factory.BeanCreationException:
>Error creating bean with name 'celtix.{http://cxf.iona.com/resource/test}MyPort'
>defined in class path resource [myConfig.xml]:
>Error setting property values;
>
>org.springframework.beans.TypeMismatchException:
>Failed to convert property value of type
>  [com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl]
>to required type
>  [com.iona.cxf.resource.configuration.types.MyStringType]
>for property 'myString';
>nested exception is java.lang.IllegalArgumentException:
>  No matching editors or conversion strategy found
>
>[...]
>
>org.springframework.beans.TypeMismatchException:
>Failed to convert property value of type
>  [com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl]
>to required type
>  [com.iona.cxf.resource.configuration.types.ResourceConfigurationType]
>for property 'resource';
>nested exception is java.lang.IllegalArgumentException:
>  No matching editors or conversion strategy found
>
>[...]
>
>at org.springframework.beans.PropertyTypeConverter.convertIfNecessary(PropertyTypeConverter.java:209)
>at org.springframework.beans.PropertyTypeConverter.convertIfNecessary(PropertyTypeConverter.java:108)
>at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:723)
>at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:575)
>at org.springframework.beans.AbstractPropertyAccessor.setPropertyValue(AbstractPropertyAccessor.java:49)
>at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:68)
>at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57)
>at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:816)
>at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:592)
>at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:392)
>at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:240)
>at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:132)
>at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:237)
>at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:153)
>at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:254)
>at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:337)
>at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:68)
>at com.iona.cxf.resource.ResourceFrameworkConfigurationTest.testConfiguration(ResourceFrameworkConfigurationTest.java:165)
>
>
>Obviously my types cannot be properly decoded, however setting the "bus"
>property works fine.
>
>
>Any input will be appreciated.
>Thanks,
>Michael
>
>  
>


Mime
View raw message