This kind of sucks. :-( Apparently, none of our tests assign a TaskExecutor as I just did a build with 2.5.6, but then ran all the tests with 3.0 and everything ran fine. Thus, this isn't something we knew about. Can you log a JIRA issue.
Most likely, we're going to have to drop down to some reflection calls to make this work with both versions of Spring. Kind of crappy. :-( Dan On Thu January 21 2010 12:30:34 pm Milan Duriancik wrote: > Hi, > > When configuring Jms Transport with a custom ThreadPoolTaskExecutor > (using JmsConfiguration), I get a NoSuchMethodError in > JmsFactory.createJmsListener. > > This is caused by a change in Spring 3.0: > > DefaultMessageListenerContainer.setTaskExecutor(TaskExecutor) -> > DefaultMessageListenerContainer.setTaskExecutor(Executor). > > (TaskExecutor extends Executor in Spring 3.0 but not in Spring 2.5.x) > > The problem is, that CXF is compiled with Spring 2.5.X. If the code is > compiled with Spring 3.0 a similar exception would be thrown when > running with Spring 2.5.X classes. > > I tested to rebuilt cxf-rt-transports-jms with the > spring.version=3.0.0.RELEASE and all works OK. > > > Is this a known problem? > > > Milan > > ------------------------------------- > > java.lang.NoSuchMethodError: > org/springframework/jms/listener/DefaultMessageListenerContainer.setTaskExe > cutor(Lorg/springframework/core/task/TaskExecutor;)V at > org.apache.cxf.transport.jms.JMSFactory.createJmsListener(JMSFactory.java: > 237) at > org.apache.cxf.transport.jms.JMSFactory.createJmsListener(JMSFactory.java: > 150) at > org.apache.cxf.transport.jms.JMSDestination.activate(JMSDestination.java:1 > 16) at > org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObs > ervable.java:48) at > org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingF > actory.java:164) at > org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFact > ory.java:805) at > org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:122) at > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:271) at > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:209) at > org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:404) at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > 79) at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm > pl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto > ry.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1529) at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto > ry.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1468) at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto > ry.initializeBean(AbstractAutowireCapableBeanFactory.java:1398) ... 37 more > -- Daniel Kulp [email protected] http://www.dankulp.com/blog
