Mule MSMQ flow gives connection refused error in Mule Studio - java

I'm trying to run the sample example from Mule blog for MSMQ.
When I setup MSMQ as global component "Test connection" says Successful, that means MSMQ is setup. Well and good till now..
Now using the following flow to test sending a message into queue:
<msmq:config name="MSMQ" serviceAddress="machinename/localhost:9000" accessToken="XZodtPym+v6NeZs+Sr4+GK9EGdA=" rootQueueName=".\private$\msmq-demo" doc:name="MSMQ" >
<msmq:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW"/>
</msmq:config>
<flow name="testingFlow1" doc:name="testingFlow1">
<http:inbound-endpoint exchange-pattern="one-way" host="localhost" port="8091" doc:name="HTTP"/>
<set-payload value="#[header:INBOUND:http.relative.path]" doc:name="Set Payload"/>
<logger message=" Sending message: #[payload]" level="INFO" doc:name="Logger"/>
<msmq:send config-ref="MSMQ" doc:name="MSMQ"/>
</flow>
When the flow hits MSMQ in console I see this error:
INFO 2014-08-07 18:00:41,299 [[testing].testingFlow1.stage1.02] org.mule.api.processor.LoggerMessageProcessor: Sending message: test
ERROR 2014-08-07 18:00:42,888 [[testing].testingFlow1.stage1.02] org.mule.retry.notifiers.ConnectNotifier: Failed to connect/reconnect: Work Descriptor. Root Exception was: Connection refused: connect. Type: class java.net.ConnectException
ERROR 2014-08-07 18:00:42,894 [[testing].testingFlow1.stage1.02] org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : Failed to invoke send. Message payload is of type: String
Code : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Connection refused: connect (java.net.ConnectException)
java.net.DualStackPlainSocketImpl:-2 (null)
2. java.net.ConnectException: Connection refused: connect (com.sun.jersey.api.client.ClientHandlerException)
com.sun.jersey.client.urlconnection.URLConnectionClientHandler:148 (null)
3. Failed to invoke send. Message payload is of type: String (org.mule.api.MessagingException)
org.mule.modules.msmq.processors.SendMessageProcessor:198 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
Any help or directions is welcome!
msmq-config picture for clarity:
Test connection succeeds

The proof of the pudding is Mule not Studio: if Mule can't connect then Studio most probably can't either, but fails to report the issue.
So you need to fix the msmq:config element until it works.
At first glance, this serviceAddress="machinename/localhost:9000" looks highly suspicious. You should either use the actual machine name and port or localhost and port if running collocated with MSMQ.

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:msmq="http://www.mulesoft.org/schema/mule/msmq" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/msmq http://www.mulesoft.org/schema/mule/msmq/current/mule-msmq.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
<msmq:config name="MSMQ" serviceAddress="x.x.x.:9333" accessToken="wRuoma0PhX4ZHA1vQosdefff=" rootQueueName=".\private$\msmqdemo" ignoreSSLWarnings="true" doc:name="MSMQ"/>
<flow name="msmqreceiveFlow">
<set-payload value="Hello" doc:name="Set Payload"/>
<msmq:send config-ref="MSMQ__MSMQ_Connection" queueName="msmqdemo" doc:name="MSMQ"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
</flow>
</mule>
Try this example I think service address is wrong.This example for sending message to MSMQ queue

Related

How to mock Mule ESB HTTP outbound Connector in a Functional Unit Test Case?

I am writing a Functional Unit test case to test a Mule Flow containing an inbound and outbound HTTP connector. The flow contains the following components:
An inbound HTTP connector that listens to a rest service call say http://localhost:8080/restapi/id
A logger that displays the id in the logs
A web service consumer that sends the soap request to server2 at the wsdl : http://server2:8080/sample.wsdl
A java component that reads recieves the output from server2 and forms the response for client.
In the functional Unit test case, I am trying to mock the HTTP outbound connector calling the serevr2.
How can I do this?
The flow configuration file code is as below:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ws="http://www.mulesoft.org/schema/mule/ws" xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ws http://www.mulesoft.org/schema/mule/ws/current/mule-ws.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd">
<http:request-config name="HTTP_Request_Configuration" host="server2" port="8080" doc:name="HTTP Request Configuration"/>
<ws:consumer-config name="Web_Service_Consumer" wsdlLocation="http://server2:8080/sample.wsdl" service="sample" port="sample" serviceAddress="sample" doc:name="Web Service Consumer"/>
<flow name="samplehttpflowFlow">
<http:listener config-ref="bookmartmanager-httpListenerConfig" path="/restapi/id" allowedMethods="GET" doc:name="HTTP"/>
<logger message="REST request received at #[java.lang.System.currentTimeMillis()]" level="INFO" doc:name="Logger"/>
<ws:consumer config-ref="Web_Service_Consumer" doc:name="Web Service Consumer"/>
<json:xml-to-json-transformer doc:name="XML to JSON"/>
</flow>
</mule>

Error in sending email in Anypoint Studio (MuleSoft)

Everytime I try to send an email in AnyPoint Studio I get an error. I've tried sending it from other computers and it always works. It just doesn't seem to work in mine and I have no idea why.
This is my .xml:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:smtp="http://www.mulesoft.org/schema/mule/smtp" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/current/mule-smtp.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<smtp:gmail-connector name="Gmail" validateConnections="true" doc:name="Gmail"/>
<flow name="attemptsendemailFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/sendemail" doc:name="HTTP"/>
<set-payload value="Hello" doc:name="Set Payload"/>
<smtp:outbound-endpoint host="smtp.gmail.com" user="myemail#gmail.com" password="mypwd" connector-ref="Gmail" to="myemail#gmail.com" from="myemail#gmail.com" subject="This is a test." responseTimeout="10000" doc:name="SMTP"/>
</flow>
</mule>
When I open the browser and type localhost:8081/sendemail, no email is sent and the browser prints this message.
Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=smtp://myemail%40gmail.com:<password>#smtp.gmail.com, connector=GmailSmtpConnector
{
name=Gmail
lifecycle=start
this=17e9bc9e
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true
connected=true
supportedProtocols=[smtp]
serviceOverrides=<none>
}
, name='endpoint.smtp.myemail.gmail.com', mep=ONE_WAY, properties={fromAddress=myemail#gmail.com, toAddresses=myemail#gmail.com, subject=This is a test.}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}.
Funny thing is, I tested the exact same xml in other computers and it works.
I would first test if your computer has connectivity to the Gmail servers.
Try "telnet smtp.gmail.com 587" or the Mac equivalent.
I can't see the port "587" in your flow.You can try the following configuration:
<smtp:outbound-endpoint
connector-ref="emailConnector"
host="smtp.gmail.com"
port="587"
user="<account name>%40gmail.com"
password="<password>"
to="<email addresses>"
from="<account name>#gmail.com"
subject="Test email message"/>
Also check if you have access to call the smtp.gmail.com from your local network

Mule SQS Connector throwing javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

I have a problem sending and receiving messages using Mule SQS Connector. Mule starts ok but throws javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated exception when i try to send or receive messages.
I am using keystores for other https outbounds.
Here is my flow
<sqs:config name="Amazon_SQS" accessKey="${AMAZON.ACCESS.KEY}"
secretKey="${AMAZON.SECRET.KEY}" queueName="${AMAZON.QUEUE.NAME}"
doc:name="Amazon SQS">
</sqs:config>
<flow name="TestFlow" doc:name="TestFlow">
<http:inbound-endpoint exchange-pattern="request-response"
host="localhost" port="8081" path="post" doc:name="HTTP" />
<set-payload
value="#['hello']"
doc:name="Set Payload" />
<json:object-to-json-transformer
doc:name="Object to JSON" />
<sqs:send-message config-ref="Amazon_SQS" doc:name="Amazon SQS"/>
</flow>
Per this question Getting "peer not authenticated" exception on Amazon SQS I'm wondering what JRE are you using? Do you have a recent Oracle JRE?
Per this blog post http://myjavacodeworld.blogspot.ca/2012/12/javaxnetsslsslpeerunverifiedexception.html, it seems you could use -Dcom.amazonaws.sdk.disableCertChecking=true to bypass the issue.

MULE ESB - simple jaxws client don't work ... - Message payload is of type: ContentLengthInputStream

Hi guys first of all I want you to see my wsdl file it's DHL24 api I want learn a bit on this and use simple example here is the link https://dhl24.com.pl/webapi.html
I want to use getVersion as you can see we don't need to provide any data to this only in response we have getVersionResult - STRING
First of all I created package generated from apache CTX using simple project here is POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>pl.test</groupId>
<artifactId>DhlServiceClient</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<apache.cxf-version>2.5.9</apache.cxf-version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${apache.cxf-version}</version>
<executions>
<execution>
<id>Wsdl2Java - gasShopService.wsdl</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/src/main/java/</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/dhlService.wsdl</wsdl>
<extraargs>
<extraarg>-client</extraarg>
<extraarg>-autoNameResolution</extraarg>
<extraarg>-p</extraarg>
<extraarg>pl.test</extraarg>
<extraarg>-aer=false</extraarg>
<extraarg>-verbose</extraarg>
<extraarg>-frontend</extraarg>
<extraarg>jaxws21</extraarg>
<extraarg>-wsdlLocation </extraarg>
<extraarg>classpath:dhlService.wsdl</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
All is fine here I have package and classes so I start to create second project (as dependency I added this package - this works fine)
Now I want to create simple flow:
<flow name="getVersion" doc:name="getVersion">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8088" path="getVersion" doc:name="HTTP"/>
<logger doc:name="getVersion" message="Test Before" level="ERROR"/>
<cxf:jaxws-client operation="getVersion" clientClass="pl.test.integration.dhl.ws.client.DHL24WebapiService" port="DHL24WebapiPort" enableMuleSoapHeaders="true" doc:name="SOAP">
</cxf:jaxws-client>
<logger doc:name="getVersion" message="Test after" level="ERROR"/>
</flow>
Nothing big but when I post to this I have:
ERROR 2014-06-28 20:36:10,289
[[gaspoldhlservice].connector.http.mule.default.receiver.02]
org.mule.api.processor.LoggerMessageProcessor: Test Before ERROR
2014-06-28 20:36:10,291
[[gaspoldhlservice].connector.http.mule.default.receiver.02]
org.mule.exception.DefaultMessagingExceptionStrategy:
**************************************************************************** Message : wrong number of arguments. Failed to route
event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor.
Message payload is of type: ContentLengthInputStream Code
: MULE_ERROR--2
-------------------------------------------------------------------------------- Exception stack is:
1. wrong number of arguments (java.lang.IllegalArgumentException) sun.reflect.NativeMethodAccessorImpl:-2 (null)
2. wrong number of arguments. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of
type: ContentLengthInputStream
(org.mule.api.transport.DispatchException)
org.mule.module.cxf.CxfOutboundMessageProcessor:150
-------------------------------------------------------------------------------- Root Exception stack trace: java.lang.IllegalArgumentException: wrong
number of arguments at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
I was searching a bit in google and found something like this. I add after inbound:
<object-to-byte-array-transformer />
And I had other error:
ERROR 2014-06-28 20:45:18,149
[[gaspoldhlservice].connector.http.mule.default.receiver.02]
org.mule.api.processor.LoggerMessageProcessor: Test Before ERROR
2014-06-28 20:45:18,151
[[gaspoldhlservice].connector.http.mule.default.receiver.02]
org.mule.exception.DefaultMessagingExceptionStrategy:
**************************************************************************** Message : wrong number of arguments. Failed to route
event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor.
Message payload is of type: byte[] Code :
MULE_ERROR--2
-------------------------------------------------------------------------------- Exception stack is:
1. wrong number of arguments (java.lang.IllegalArgumentException) sun.reflect.NativeMethodAccessorImpl:-2 (null)
2. wrong number of arguments. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of
type: byte[] (org.mule.api.transport.DispatchException)
org.mule.module.cxf.CxfOutboundMessageProcessor:150
-------------------------------------------------------------------------------- Root Exception stack trace: java.lang.IllegalArgumentException: wrong
number of arguments at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
I need a little bit push here its very simple method and I cant handle it right ...
AFTER EDIT:
Changed to your flow with:
<flow name="getVersion" doc:name="getVersion">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8088" path="getVersion" doc:name="HTTP"/>
<cxf:jaxws-client operation="getVersion" serviceClass="pl.test.integration.dhl.ws.client.DHL24WebapiService" port="DHL24WebapiPort" enableMuleSoapHeaders="true" doc:name="SOAP">
</cxf:jaxws-client>
<http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:8088/consumeTest" doc:name="HTTP" method="POST"/>
</flow>
<flow name="consumeTest" doc:name="consumeTest">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8088" path="consumeTest" doc:name="HTTP"/>
<logger doc:name="getVersion" message="Test AFTER" level="ERROR"/>
</flow>
Answer is
No such operation: getVersion. Failed to route event via endpoint:
org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of
type: ContentLengthInputStream
When I use clientClass instead of serviceClass:
wrong number of arguments. Failed to route event via endpoint:
org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of
type: ContentLengthInputStream
You need to put an outbound endpoint after cxf:jaxws-client like
<http:outbound-endpoint exchange-pattern="request-response" address="Your external webservice path that you are tying to consume " doc:name="HTTP" method="POST"/> to post the value to the external webservice ..
for example If your external webservice is at http://localhost:8086/mainData?wsdl then you need to put
<http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:8086/mainData" doc:name="HTTP" method="POST"/> ................ and one more thing ... could you plase change
<cxf:jaxws-client operation="getVersion" clientClass="pl.execon.integration.dhl.ws.client.DHL24WebapiService" port="DHL24WebapiPort" enableMuleSoapHeaders="true" doc:name="SOAP"> to
`<cxf:jaxws-client operation="getVersion" serviceClass="pl.execon.integration.dhl.ws.client.DHL24WebapiService" port="DHL24WebapiPort" enableMuleSoapHeaders="true" doc:name="SOAP">` in your flow and try ...
So the final flow would be something like :-
<flow name="getVersion" doc:name="getVersion">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8088" path="getVersion" doc:name="HTTP"/>
<cxf:jaxws-client operation="getVersion" serviceClass="pl.execon.integration.dhl.ws.client.DHL24WebapiService" port="DHL24WebapiPort" enableMuleSoapHeaders="true" doc:name="SOAP">
</cxf:jaxws-client>
<http:outbound-endpoint exchange-pattern="request-response" address="Your external webservice path that you are tying to consume " doc:name="HTTP" method="POST"/>
</flow>
AFTER EDIT:
Changed to your flow with:
<flow name="getVersion" doc:name="getVersion">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8088" path="getVersion" doc:name="HTTP"/>
<cxf:jaxws-client operation="getVersion" serviceClass="pl.test.integration.dhl.ws.client.DHL24WebapiService" port="DHL24WebapiPort" enableMuleSoapHeaders="true" doc:name="SOAP">
</cxf:jaxws-client>
<http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:8088/consumeTest" doc:name="HTTP" method="POST"/>
</flow>
<flow name="consumeTest" doc:name="consumeTest">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8088" path="consumeTest" doc:name="HTTP"/>
<logger doc:name="getVersion" message="Test AFTER" level="ERROR"/>
</flow>
Answer is
No such operation: getVersion. Failed to route event via endpoint:
org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of
type: ContentLengthInputStream
When I use clientClass instead of serviceClass:
wrong number of arguments. Failed to route event via endpoint:
org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of
type: ContentLengthInputStream

Helloworld Mule Rest WS error

I am trying to get the basic http rest helloworld example working in Mule but I get this error
Could not find a transformer to transform "SimpleDataType{type=java.lang.String, mimeType='*/*'}" to "SimpleDataType{type=java.io.InputStream, mimeType='*/*'}". (org.mule.api.transformer.TransformerException). Message payload is of type: String
This is my config file:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.3/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.3/mule-http.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/3.3/mule-xml.xsd
http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/3.0/mule-jersey.xsd
http://jersey.apache.org/core http://jersey.apache.org/schemas/core.xsd">
<flow name="HelloWorld">
<inbound-endpoint address="http://localhost:8081/api"/>
<jersey:resources>
<component class="com.helloworld.AdminApi"/>
</jersey:resources>
</flow>
</mule>
And my jersey service class
#Path("version")
public class AdminApi {
#GET
#Produces("text/plain")
public String sayHelloWithUri() {
return "Version 999 " ;
}
}
I am trying to access the service using:
http://localhost:8081/api/version
which I believe should be the right url but no luck I always get the above exception message.
Anyone has an idea what this could be?
EDIT:
Root Exception stack trace:
org.mule.api.registry.ResolverException: There are two transformers that are an exact match for input: "class java.lang.String", output: "class java.io.InputStream". Transformers are: "_ObjectToInputStream(class org.mule.transformer.simple.ObjectToInputStream)" and "_ObjectToInputStream(class org.mule.transformer.simple.ObjectToInputStream)"
at org.mule.transformer.graph.GraphTransformerResolver.resolve(GraphTransformerResolver.java:65)
at org.mule.registry.TypeBasedTransformerResolver.resolve(TypeBasedTransformerResolver.java:93)
at org.mule.registry.MuleRegistryHelper.resolveTransformer(MuleRegistryHelper.java:265)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
Your configuration runs just fine with Mule 3.3.0 (tested outside of Tomcat, in Eclipse) so I suspect the problem comes from either missing or duplicated JARs on your web application classpath.
Check the JARs that get packaged in WEB-INF/lib and potential manually added JARs in Tomcat's /lib directory.
<flow name="HelloWorld">
<inbound-endpoint address="http://localhost:8081/api"/>
<jersey:resources>
<component class="com.helloworld.AdminApi"/>
</jersey:resources>
</flow>
and use this url. http://localhost:8081/api/version
result is -Version 999
If you are running with Mule Studio 3.3.0, you must put the mimeType.
Example:
<flow name="RestServiceFlow" doc:name="RestServiceFlow">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8083" doc:name="HTTP" mimeType="application/json"/>
<jersey:resources doc:name="RESTUTCNotification">
<component class="example.esb.restApi"/>
</jersey:resources>
</flow>

Categories