[mule-user] Mule/ActiveMQ

1 view
Skip to first unread message

Martin Petrella

unread,
May 5, 2008, 3:03:44 PM5/5/08
to us...@mule.codehaus.org

Below is a mule configuration I'm using as a simple Mule/ActiveMQ integration
example.

I get the following exception and am at a loss as to which transformer to
use to resolve the problem.

ERROR 2008-05-05 14:44:21,956 [outboundConnector.dispatcher.7]
org.mule.DefaultExceptionStrategy:
********************************************************************************
Message : Could not find a transformer to transform
"org.apache.activemq.command.ActiveMQStreamMessage" to
"java.io.InputStream".
Type : org.mule.api.transformer.TransformerException
Code : MULE_ERROR-65237
JavaDoc :
http://mule.mulesource.org/docs/apidocs/org/mule/api/transformer/TransformerException.html
********************************************************************************
Exception stack is:
1. Could not find a transformer to transform
"org.apache.activemq.command.ActiveMQStreamMessage" to
"java.io.InputStream". (org.mule.api.transformer.TransformerException)
org.mule.registry.AbstractRegistry:288
(http://mule.mulesource.org/docs/apidocs/org/mule/api/transformer/TransformerException.html)
********************************************************************************
Root Exception stack trace:
org.mule.api.transformer.TransformerException: Could not find a transformer
to transform "org.apache.activemq.command.ActiveMQStreamMessage" to
"java.io.InputStream".
at
org.mule.registry.AbstractRegistry.lookupTransformer(AbstractRegistry.java:288)
at
org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:160)
at
org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:118)
at
org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:317)
at
org.mule.transport.file.FileMessageDispatcher.doDispatch(FileMessageDispatcher.java:77)
at
org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:261)
at org.mule.work.WorkerContext.run(WorkerContext.java:310)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:595)

********************************************************************************


Mule Configuration:

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:file="http://www.mulesource.org/schema/mule/file/2.0"
xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.0"
xmlns:management="http://www.mulesource.org/schema/mule/management/2.0"
xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.0"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.0"

xsi:schemaLocation="http://www.mulesource.org/schema/mule/core/2.0
http://www.mulesource.org/schema/mule/core/2.0/mule.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.mulesource.org/schema/mule/file/2.0
http://www.mulesource.org/schema/mule/file/2.0/mule-file.xsd
http://www.mulesource.org/schema/mule/jms/2.0
http://www.mulesource.org/schema/mule/jms/2.0/mule-jms.xsd
http://www.mulesource.org/schema/mule/management/2.0
http://www.mulesource.org/schema/mule/management/2.0/mule-management.xsd
http://www.mulesource.org/schema/mule/stdio/2.0
http://www.mulesource.org/schema/mule/stdio/2.0/mule-stdio.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.mulesource.org/schema/mule/vm/2.0
http://www.mulesource.org/schema/mule/vm/2.0/mule-vm.xsd">


<!--=====================================================================================================
Connectors
-->
<file:connector name="inboundConnector" pollingFrequency="100"
fileAge="100" />
<file:connector name="outboundConnector" outputPattern="${ORIGINALNAME}" />
<jms:activemq-connector name="jmsConnector"
brokerURL="tcp://127.0.0.1:61616" />


<!--=====================================================================================================
Endpoints
-->
<endpoint name="inboundEndpoint" connector-ref="inboundConnector"
address="file:///c:/data/mule/inbound" />
<endpoint name="outboundEndpoint" connector-ref="outboundConnector"
address="file:///c:/data/mule/processed" />
<endpoint name="jmsEndpoint" address="jms://test1.queue"
connector-ref="jmsConnector"/>


<!--=====================================================================================================
Model
-->

<model name="HFS-InboundFaxScannerModel">
<service name="HFS-InboundFaxMetadataScanner">
<inbound>
<inbound-endpoint ref="inboundEndpoint">
<custom-filter
class="org.mule.transport.file.filters.FilenameWildcardFilter">
<spring:property name="pattern" value="*.xml" />
<spring:property name="caseSensitive" value="false" />
</custom-filter>
</inbound-endpoint>
</inbound>

<outbound>
<outbound-pass-through-router>
<outbound-endpoint ref="jmsEndpoint" />
</outbound-pass-through-router>
</outbound>
</service>

<service name="ReceivedMetadataQueue">
<inbound>
<inbound-endpoint ref="jmsEndpoint" />
</inbound>

<outbound>
<outbound-pass-through-router>
<outbound-endpoint ref="outboundEndpoint" />
</outbound-pass-through-router>
</outbound>
</service>
</model>
</mule>
--
View this message in context: http://www.nabble.com/Mule-ActiveMQ-tp17068532p17068532.html
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Dirk Olmes

unread,
May 6, 2008, 3:31:22 AM5/6/08
to us...@mule.codehaus.org
Martin Petrella wrote:
> Below is a mule configuration I'm using as a simple Mule/ActiveMQ integration
> example.
>
> I get the following exception and am at a loss as to which transformer to
> use to resolve the problem.

[...]

> ********************************************************************************
> Message : Could not find a transformer to transform
> "org.apache.activemq.command.ActiveMQStreamMessage" to
> "java.io.InputStream".

Seems like you're missing a transformer in the chain.

Can you check if you have JMSMessageToObject in your transformers?
Declaring it as global transformer should be enough IIRC for the
auto-transformer mechanism to find it.

-dirk

Martin Petrella

unread,
May 6, 2008, 10:16:33 AM5/6/08
to us...@mule.codehaus.org

I added then following transformer to my configuration but it did not resolve
the problem. I'm still getting the exception.

<jms:jmsmessage-to-object-transformer />

--
View this message in context: http://www.nabble.com/Mule-ActiveMQ-tp17068532p17083446.html


Sent from the Mule - User mailing list archive at Nabble.com.

Dirk Olmes

unread,
May 6, 2008, 10:20:48 AM5/6/08
to us...@mule.codehaus.org
Martin Petrella wrote:
> I added then following transformer to my configuration but it did not resolve
> the problem. I'm still getting the exception.
>
> <jms:jmsmessage-to-object-transformer />

Please file an issue then so we can have a closer look at it.

Thanks,

Daniel Feist

unread,
May 6, 2008, 1:40:06 PM5/6/08
to us...@mule.codehaus.org
Reply all
Reply to author
Forward
0 new messages