Camel
  1. Camel
  2. CAMEL-5084

Error when mocking all endpoints and using cxf

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.1
    • Fix Version/s: 2.9.2
    • Component/s: camel-cxf
    • Labels:
      None
    • Environment:

      Generic windows

    • Estimated Complexity:
      Unknown

      Description

      When upgrading from Apache Camel 2.9.0 to 2.9.1 I suddently get an error when using camel-cxf endpoints. When running my JUnit tests (extending CamelSpringTestSupport) I get this exception:

      Caused by: java.lang.NullPointerException
      at org.apache.camel.component.cxf.CxfProducer.getBindingOperationInfo(CxfProducer.java:331)
      at org.apache.camel.component.cxf.CxfProducer.prepareBindingOperation(CxfProducer.java:202)
      at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:141)
      at org.apache.camel.impl.SynchronousDelegateProducer.process(SynchronousDelegateProducer.java:61)
      at org.apache.camel.impl.InterceptSendToEndpoint$1.process(InterceptSendToEndpoint.java:144)
      at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:56)
      When I debug my test I see that the method doStart() in CxfProducer is never called, resulting in client being null (hence the NullPointerException in CxfProducer.java:331 ).

      I suspect the mocking all endpoints with the InterceptSendToEndpoint,
      short-circut the startup procedure to not delegate the start call to
      the intercepted endpoint. Or there abouts.

      See discussion in camel user forum: http://camel.465427.n5.nabble.com/Error-using-apache-cxf-w-Camel-2-9-1-tc5560906.html

      1. hefiso-test.zip
        30 kB
        Henrik Filtenborg Sørensen

        Issue Links

          Activity

            People

            • Assignee:
              Willem Jiang
              Reporter:
              Henrik Filtenborg Sørensen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development