On Wed February 11 2009 6:17:08 pm guofoo wrote:
> I'm trying to use Spring 3.0.0 M1 with CXF by replacing the
> spring-xxx-2.0.8.jar files with the Spring jars, but I'm seeing the
> following exception when trying to start Tomcat 6.0.18.
>
> Is CXF compatible with Spring 3.0.0?

Hmmm....  apparently not.  Looking at the javadoc for 2.5.5, I see:

         * Specify the custom editors to register via a {...@link Map}, using 
the
         * class name of the required type as the key and the class name of the
         * associated {...@link PropertyEditor} as value.
         * <p>Also supports {...@link PropertyEditor} instances as values; 
however,
         * this is deprecated since Spring 2.0.7 and will be removed in Spring 
3.0.

And if you look at the cxf-extension-soap.xml, I see:

                <property name="customEditors">
                        <map>
                                <entry 
key="org.apache.cxf.binding.soap.SoapVersion">
                                        <bean 
class="org.apache.cxf.binding.soap.SoapVersionEditor"/>
                                </entry>
                        </map>
                </property>
which looks like a problem.    Most likely, this needs to be changed to just:

                <property name="customEditors">
                        <map>
                                <entry 
key="org.apache.cxf.binding.soap.SoapVersion">org.apache.cxf.binding.soap.SoapVersionEditor>
                                </entry>
                        </map>
                </property>
or similar to pass the editor class name as a string.    Can you log a JIRA?    
If you could even test that, that would be great.

Dan


>
>
> 15:03:03.550 [main] ERROR o.s.web.context.ContextLoader - Context
> initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'org.apache.cxf.binding.soap.customEditorConfigurer' defined
> in class path resource [META-INF/cxf/cxf-extension-soap.xml]:
> Initialization of bean failed; nested exception is
> org.springframework.beans.TypeMismatchException: Failed to convert property
> value of type [java.util.LinkedHashMap] to required type [java.util.Map]
> for property 'customEditors'; nested exception is
> java.lang.IllegalArgumentException: Cannot convert value of type
> [org.apache.cxf.binding.soap.SoapVersionEditor] to required type
> [java.lang.String] for property
> 'customEditors[org.apache.cxf.binding.soap.SoapVersion]': no matching
> editors or conversion strategy found
>       at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor
>y.doCreateBean(AbstractAutowireCapableBeanFactory.java:482) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor
>y$1.run(AbstractAutowireCapableBeanFactory.java:411) at
> java.security.AccessController.doPrivileged(Native Method)
>       at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor
>y.createBean(AbstractAutowireCapableBeanFactory.java:382) at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(A
>bstractBeanFactory.java:271) at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getS
>ingleton(DefaultSingletonBeanRegistry.java:222) at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(Abs
>tractBeanFactory.java:268) at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Abstr
>actBeanFactory.java:174) at
> org.springframework.context.support.AbstractApplicationContext.getBean(Abst
>ractApplicationContext.java:875) at
> org.springframework.context.support.AbstractApplicationContext.invokeBeanFa
>ctoryPostProcessors(AbstractApplicationContext.java:525) at
> org.springframework.context.support.AbstractApplicationContext.refresh(Abst
>ractApplicationContext.java:360) at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(C
>ontextLoader.java:254) at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(Con
>textLoader.java:198) at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(Co
>ntextLoaderListener.java:47) at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java
>:3830) ....
>
> Thanks.

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to