0
votes

In my proxy service, am trying to create endpoint with JMS-ActiveMQ and it fails in the uri. Is my JMS Endpoint uri correct? am using ActiveMQ with EI611 on tooling380.

<?xml version="1.0" encoding="UTF-8"?>
<proxy name="CSVProcessor" startOnLoad="true" transports="vfs" xmlns="http://ws.apache.org/ns/synapse">
<target>
    <inSequence>
        <log level="full"/>
        <smooks config-key="smooks-config" description="GetSmooks">
            <input type="text"/>
            <output type="xml"/>
        </smooks>
        <log description="GetData" level="full"/>
        <datamapper config="gov:datamapper/NewConfig.dmc" description="MapPriceData" inputSchema="gov:datamapper/NewConfig_inputSchema.json" inputType="XML" outputSchema="gov:datamapper/NewConfig_outputSchema.json" outputType="XML"/>
        <log description="LogDataMapper" level="full"/>
        <property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
        <send>
            <endpoint>
                <address uri="jms:/foo.bar?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&amp;transport.jms.DestinationType=queue"/>
            </endpoint>
        </send>
    </inSequence>
    <outSequence/>
    <faultSequence/>
</target>
<parameter name="transport.PollInterval">5</parameter>
<parameter name="transport.vfs.FileURI">file://c:\test-data\in</parameter>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.MoveAfterFailure">file://c:\test-data\original</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.csv</parameter>
<parameter name="transport.vfs.MoveAfterProcess">file://c:\test-data\out</parameter>
</proxy>

Error :

[2017-10-19 17:20:30,944] [] ERROR - ClientUtils The system cannot infer the transport information from the jms:/foo.bar?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue URL. [2017-10-19 17:20:30,948] [] ERROR - Axis2Sender Unexpected error during sending message out org.apache.axis2.AxisFault: The system cannot infer the transport information from the jms:/foo.bar?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue URL. at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.java:81) at org.apache.axis2.client.OperationClient.prepareMessageContext(OperationClient.java:288) at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:249) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:595) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:83) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548) at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382) at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65) at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:121) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158) at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:213) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.axis2.transport.base.AbstractTransportListener.handleIncomingMessage(AbstractTransportListener.java:328) at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:824) at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:472) at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:188) at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:134) at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [2017-10-19 17:20:30,958] [] WARN - EndpointContext Endpoint : AnonymousEndpoint with address jms:/foo.bar?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue will be marked SUSPENDED as it failed

1
I enabled all relevant config in axis2.xml and axis2-client.xml. Still the same error.MaMuDragon

1 Answers

1
votes

Ok, that was my bad.

I did not fully uncomment the below entry in axis2.xml(in C:\wso2ei-6.1.1\conf\axis2), which resulted in this error. I uncommented the leading <!-- but not the trailing -->. Am an idiot, for sure.

<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/>

After uncommenting, the data transformed from the source CSV file into a new XML format, was sent to the destination jms queue of ActiveMQ, as desired.