Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2630

JmsConfiguration with custom TaskExecutor with Spring 3.0 => NoSuchMethodError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.5
    • 2.2.8
    • Transports
    • None
    • All

    • Novice

    Description

      When configuring Jms Transport with a custom ThreadPoolTaskExecutor (using JmsConfiguration), I get a NoSuchMethodError in
      JmsFactory.createJmsListener (tested with cxf 2.2.5 and 2.2.6-SNAPSHOT, 21/01/2010) .

      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)

      I tested to rebuilt cxf-rt-transports-jms with spring.version=3.0.0.RELEASE and it was OK when executed with Spring 3.0 classes.

      To support both spring versions 3.. and 2.5.* a reflexion call to setTaskExecutor(...) should be made.

      -------------------------------------
      the exception:

      java.lang.NoSuchMethodError:
      org/springframework/jms/listener/DefaultMessageListenerContainer.setTaskExecutor(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:116)
      at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:48)
      at org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:164)
      at org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.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(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:618)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1529)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1468)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398)
      ... 37 more

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            miland Milan Duriancik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: