StreamCacheConverter troubles
-----------------------------

                 Key: SM-1826
                 URL: https://issues.apache.org/activemq/browse/SM-1826
             Project: ServiceMix
          Issue Type: Bug
    Affects Versions: 3.3
         Environment: Windows XP SP2, Apache ServiceMix 3.2.2, Apache Camel 
1.6.0
            Reporter: Ivan
         Attachments: stacktrace.txt

I've got polling consumer SU(based on proper maven archetype), that sends 
files, marshaled in primitive way(converted to StringSource) to myFileHandler.
<file:poller service="myServices:myFilePoller"
               endpoint="endpoint"
               targetService="myServices:myFileHandler"
               targetEndpoint="endpoint"
               file="file:///D:/temp/camel/poller"
                           autoCreateDirectory="true">


Also I've got camel SU with route:

public void configure() {           
                noStreamCaching();
        
from("jbi:endpoint:http://my.test.com/myServices/myFileHandler/endpoint";)
                .to("activemq:queue:processingQueue");          
                
        from("activemq:queue:processingQueue")
                .to("log:ok");          
    } 

Throws exception:
WARN  - EndpointMessageListener        - 
Endpoint[activemq:queue:processingQueue] consumer caught an exception while 
process
ing JMS message: ActiveMQObjectMessage {commandId = 5, responseRequired = true, 
messageId = ID:EPUAKYIW0502-3607-12373002117
18-4:51:1:1:1, originalDestination = null, originalTransactionId = null, 
producerId = ID:EPUAKYIW0502-3607-1237300211718-4:5
1:1:1, destination = queue://processingQueue, transactionId = null, expiration 
= 0, timestamp = 1237301839833, arrival = 0,
brokerInTime = 1237301839833, brokerOutTime = 1237301839833, correlationId = 
null, replyTo = null, persistent = true, type =
 null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = 
null, compressed = false, userID = null, content
= org.apache.activemq.util.byteseque...@e2a846, marshalledProperties = null, 
dataStructure = null, redeliveryCounter = 0, si
ze = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, 
droppable = false}
org.apache.camel.RuntimeCamelException: 
org.apache.camel.component.jms.RuntimeJmsException: Failed to extract body due 
to: j
avax.jms.JMSException: Failed to build body from bytes. Reason: 
java.io.InvalidClassException: org.apache.camel.converter.st
ream.StreamCacheConverter$SourceCache; 
org.apache.camel.converter.stream.StreamCacheConverter$SourceCache; no valid 
construc
tor. Message: ActiveMQObjectMessage {commandId = 5, responseRequired = true, 
messageId = ID:EPUAKYIW0502-3607-1237300211718-
4:51:1:1:1, originalDestination = null, originalTransactionId = null, 
producerId = ID:EPUAKYIW0502-3607-1237300211718-4:51:1
:1, destination = queue://processingQueue, transactionId = null, expiration = 
0, timestamp = 1237301839833, arrival = 0, bro
kerInTime = 1237301839833, brokerOutTime = 1237301839833, correlationId = null, 
replyTo = null, persistent = true, type = nu
ll, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, 
compressed = false, userID = null, content = o
rg.apache.activemq.util.byteseque...@e2a846, marshalledProperties = null, 
dataStructure = null, redeliveryCounter = 0, size
= 0, properties = null, readOnlyProperties = true, readOnlyBody = true, 
droppable = false}
        at 
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:842)
        at 
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:95)
        at 
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContain
er.java:543)
        at 
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer
.java:482)
        at 
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContai
ner.java:451)
        at 
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessa
geListenerContainer.java:323)
        at 
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessage
ListenerContainer.java:261)
        at 
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(Defau
ltMessageListenerContainer.java:982)
        at 
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageLi
stenerContainer.java:881)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.camel.component.jms.RuntimeJmsException: Failed to 
extract body due to: javax.jms.JMSException: Failed
 to build body from bytes. Reason: java.io.InvalidClassException: 
org.apache.camel.converter.stream.StreamCacheConverter$Sou
rceCache; org.apache.camel.converter.stream.StreamCacheConverter$SourceCache; 
no valid constructor. Message: ActiveMQObjectM
essage {commandId = 5, responseRequired = true, messageId = 
ID:EPUAKYIW0502-3607-1237300211718-4:51:1:1:1, originalDestinati
on = null, originalTransactionId = null, producerId = 
ID:EPUAKYIW0502-3607-1237300211718-4:51:1:1, destination = queue://pro
cessingQueue, transactionId = null, expiration = 0, timestamp = 1237301839833, 
arrival = 0, brokerInTime = 1237301839833, br
okerOutTime = 1237301839833, correlationId = null, replyTo = null, persistent = 
true, type = null, priority = 4, groupID = n
ull, groupSequence = 0, targetConsumerId = null, compressed = false, userID = 
null, content = org.apache.activemq.util.ByteS
eque...@e2a846, marshalledProperties = null, dataStructure = null, 
redeliveryCounter = 0, size = 0, properties = null, readO
nlyProperties = true, readOnlyBody = true, droppable = false}
        at 
org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:105)
        at 
org.apache.camel.component.jms.JmsMessage.createBody(JmsMessage.java:148)
        at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:44)
        at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:51)
        at 
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:74)
        at 
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
        at 
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:72)
        ... 8 more
Caused by: javax.jms.JMSException: Failed to build body from bytes. Reason: 
java.io.InvalidClassException: org.apache.camel.
converter.stream.StreamCacheConverter$SourceCache; 
org.apache.camel.converter.stream.StreamCacheConverter$SourceCache; no va
lid constructor
        at 
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
        at 
org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:183)
        at 
org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:91)
        ... 16 more
Caused by: java.io.InvalidClassException: 
org.apache.camel.converter.stream.StreamCacheConverter$SourceCache; 
org.apache.cam
el.converter.stream.StreamCacheConverter$SourceCache; no valid constructor
        at 
java.io.ObjectStreamClass.checkDeserialize(ObjectStreamClass.java:713)
        at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1733)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at 
org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:177)
        ... 17 more
Caused by: java.io.InvalidClassException: 
org.apache.camel.converter.stream.StreamCacheConverter$SourceCache; no valid 
const
ructor
        at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:471)
        at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1106)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
        at 
org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
        at 
org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:155)
        at 
org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:317)
        at 
org.apache.activemq.pool.PooledSession.createObjectMessage(PooledSession.java:149)
        at 
org.apache.camel.component.jms.JmsBinding.createJmsMessage(JmsBinding.java:334)
        at 
org.apache.camel.component.jms.JmsBinding.makeJmsMessage(JmsBinding.java:197)
        at 
org.apache.camel.component.jms.JmsProducer$2.createMessage(JmsProducer.java:229)
        at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:570)
        at 
org.springframework.jms.core.JmsTemplate$4.doInJms(JmsTemplate.java:551)
        at 
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:471)
        at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:548)
        at 
org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:227)
        at 
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcesso
rTypeConverter.java:43)
        at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:84)
        at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
        at 
org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)
        at 
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)
        at 
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:189)
        at 
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:133)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:115)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:89)
        at 
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
        at 
org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)
        at 
org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)
        at 
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
        at 
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at 
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
        at 
org.apache.servicemix.camel.CamelProviderEndpoint.handleActiveProviderExchange(CamelProviderEndpoint.java:94)
        at 
org.apache.servicemix.camel.CamelProviderEndpoint.process(CamelProviderEndpoint.java:73)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
        at 
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
        at 
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
        at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
        at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        ... 1 more

Please help :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to