git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

java.lang.ClassCastException: org.jclouds.io.payloads.ByteSourcePayload cannot be cast to org.apache.camel.StreamCache


Hi,
I've run in to an issue that if jclouds is availible on classpath (e.g. as dependency of camel-jclouds component) then camel-file will get a ClassCastException when consuming a file if stream cache is used like this:

Caused by: java.lang.ClassCastException: org.jclouds.io.payloads.ByteSourcePayload cannot be cast to org.apache.camel.StreamCache

        at org.apache.camel.impl.DefaultStreamCachingStrategy.cache(DefaultStreamCachingStrategy.java:191)         at org.apache.camel.processor.CamelInternalProcessor$StreamCachingAdvice.before(CamelInternalProcessor.java:810)         at org.apache.camel.processor.CamelInternalProcessor$StreamCachingAdvice.before(CamelInternalProcessor.java:789)         at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:149)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)         at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)         at org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186)         at org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86)         at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541)         at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506)         at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369)         at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506)
        at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:229)
        at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:144)         at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeader(DefaultProducerTemplate.java:187)

        at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1847)         at org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:713)         at org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:515)         at org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:511)         at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeader(DefaultProducerTemplate.java:189)         at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeader(DefaultProducerTemplate.java:382)

I'm using wildfly-camel which deploys jclouds camel-jclouds modules, the solution is to removes them which makes this error dissapear.

Should I file a bug ticket on it?
/Sverker