Jonathan Anstey created CAMEL-6663: -------------------------------------- Summary: camel-sap-netweaver throws JsonParseException when using json=false option Key: CAMEL-6663 URL: https://issues.apache.org/jira/browse/CAMEL-6663 Project: Camel Issue Type: Bug Reporter: Jonathan Anstey Assignee: Jonathan Anstey Fix For: 2.12.0
If you set json=false like: {code} sap-netweaver:https://sapes1.sapdevcenter.com/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT/?username=USER&password=PASS&json=false {code} It will try and parse the body as JSON because jsonAsMap is still true. This is the result: {code} org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@343eb53f; line: 1, column: 2] at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433)[51:jackson-core-asl:1.9.10] at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521)[51:jackson-core-asl:1.9.10] at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:442)[51:jackson-core-asl:1.9.10] at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:1198)[51:jackson-core-asl:1.9.10] at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:485)[51:jackson-core-asl:1.9.10] at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2770)[53:jackson-mapper-asl:1.9.10] at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2718)[53:jackson-mapper-asl:1.9.10] at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1863)[53:jackson-mapper-asl:1.9.10] at org.apache.camel.component.sap.netweaver.NetWeaverProducer.process(NetWeaverProducer.java:61)[237:org.apache.camel.camel-sap-netweaver:2.12.0.redhat-610030] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:192)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:192)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:352)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:199)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:165)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:152)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)[131:org.apache.camel.camel-core:2.12.0.redhat-610030] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_25] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)[:1.7.0_25] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)[:1.7.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)[:1.7.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_25] at java.lang.Thread.run(Thread.java:724)[:1.7.0_25] {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira