Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11527

camel-olingo2 uses upper-case UTF-7 as Accept header instead of lower case utf-7

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.19.1
    • None
    • camel-olingo2
    • None
    • Unknown

    Description

      Not sure if this component is still used/should be deprecated but I have the fix locally so might as well

      The problem is that odata2 services are expecting lower-case ut7 as Accept header while we provide UTF-7 which produces the following error:

      org.apache.camel.RuntimeCamelException: Error reading EDM: No match for accept header
      	at org.apache.camel.component.olingo2.Olingo2AppWrapper.getEdm(Olingo2AppWrapper.java:93) [226:org.apache.camel.camel-olingo2:2.20.0.SNAPSHOT]
      	at org.apache.camel.component.olingo2.Olingo2Endpoint.interceptProperties(Olingo2Endpoint.java:163) [226:org.apache.camel.camel-olingo2:2.20.0.SNAPSHOT]
      	at org.apache.camel.component.olingo2.Olingo2Producer.process(Olingo2Producer.java:53) [226:org.apache.camel.camel-olingo2:2.20.0.SNAPSHOT]
      	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) [57:org.apache.camel.camel-core:2.20.0.SNAPSHOT]
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [57:org.apache.camel.camel-core:2.20.0.SNAPSHOT]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [57:org.apache.camel.camel-core:2.20.0.SNAPSHOT]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:120) [57:org.apache.camel.camel-core:2.20.0.SNAPSHOT]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:83) [57:org.apache.camel.camel-core:2.20.0.SNAPSHOT]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [57:org.apache.camel.camel-core:2.20.0.SNAPSHOT]
      	at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:451) [57:org.apache.camel.camel-core:2.20.0.SNAPSHOT]
      	at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:218) [57:org.apache.camel.camel-core:2.20.0.SNAPSHOT]
      	at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:182) [57:org.apache.camel.camel-core:2.20.0.SNAPSHOT]
      	at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174) [57:org.apache.camel.camel-core:2.20.0.SNAPSHOT]
      	at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101) [57:org.apache.camel.camel-core:2.20.0.SNAPSHOT]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
      	at java.lang.Thread.run(Thread.java:745) [?:?]
      Caused by: org.apache.olingo.odata2.api.exception.ODataApplicationException: No match for accept header
      	at org.apache.camel.component.olingo2.api.impl.AbstractFutureCallback.checkStatus(AbstractFutureCallback.java:65) ~[?:?]
      	at org.apache.camel.component.olingo2.api.impl.AbstractFutureCallback.completed(AbstractFutureCallback.java:84) ~[?:?]
      	at org.apache.camel.component.olingo2.api.impl.AbstractFutureCallback.completed(AbstractFutureCallback.java:41) ~[?:?]
      	at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119) ~[?:?]
      	at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:181) ~[?:?]
      	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:437) ~[?:?]
      	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:327) ~[?:?]
      	at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265) ~[?:?]
      	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81) ~[?:?]
      	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39) ~[?:?]
      	at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114) ~[?:?]
      	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162) ~[?:?]
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337) ~[?:?]
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315) ~[?:?]
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276) ~[?:?]
      	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) ~[?:?]
      	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588) ~[?:?]
      

      I can provide a fix is this component is still used.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jpoth John Poth
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: