Six Stars

Talend ESB: CRest consumer: fails with "JAXRS operation failed invoking cMQConnectionFactory1://queue:NS_Invoices with statusCode: 404"

Hi,

 

I am using Talend studio 6.4.1 community edition. I have the below route, that reads from a queue and calls a REST service defined using tRESTRequest.

I am getting the below error. please suggest what could be the issue. 

 

 

cREST-issue.png

 

Starting job Invoice_channel_to_SFDC at 09:00 06/09/2017.

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/E:/TOS_ESB-20170623_1246-V6.4.1/Studio/workspace/.Java/lib/activemq-all-5.14.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/E:/TOS_ESB-20170623_1246-V6.4.1/Studio/workspace/.Java/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[statistics] connecting to socket on port 3827
[statistics] connected
[ERROR]: org.apache.camel.processor.DefaultErrorHandler - Failed delivery for (MessageId: IDSmiley FrustratedMUDIMALA2-55710-1504713593090-1:1:1:1:1 on ExchangeId: ID-SMUDIMALA2-55733-1504713613969-0-1). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.cxf.CxfOperationException: JAXRS operation failed invoking cMQConnectionFactory1://queue:NS_Invoices with statusCode: 404

Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor Elapsed (ms)
[Invoice_channel_to] [Invoice_channel_to] [cMQConnectionFactory1://queue:NS_Invoices ] [ 317]
[Invoice_channel_to] [Invoice_channel_to] [setHeader[Content-Type] ] [ 3]
[Invoice_channel_to] [setHeader1 ] [setHeader[CamelHttpPath] ] [ 0]
[Invoice_channel_to] [setHeader2 ] [setHeader[CamelHttpMethod] ] [ 0]
[Invoice_channel_to] [setHeader3 ] [setHeader[CamelAcceptContentType] ] [ 0]
[Invoice_channel_to] [setHeader4 ] [setHeader[Content-Type] ] [ 0]
[Invoice_channel_to] [to1 ] [cxfrs://bean://cREST_1?loggingFeatureEnabled=false ] [ 310]

Exchange
---------------------------------------------------------------------------------------------------------------------------------------
Exchange[
Id ID-SMUDIMALA2-55733-1504713613969-0-1
ExchangePattern InOnly
Headers {breadcrumbId=ID-SMUDIMALA2-55690-1504713577770-0-1, CamelAcceptContentType=application/xml, CamelHttpMethod=POST, CamelHttpPath=, CamelRedelivered=false, CamelRedeliveryCounter=0, Content-Type=application/xml, firedTime=Wed Sep 06 08:59:39 PDT 2017, JMSCorrelationID=null, JMSCorrelationIDAsBytes=null, JMSDeliveryMode=2, JMSDestination=queue://NS_Invoices, JMSExpiration=0, JMSMessageID=IDSmiley FrustratedMUDIMALA2-55710-1504713593090-1:1:1:1:1, JMSPriority=4, JMSRedelivered=false, JMSReplyTo=null, JMSTimestamp=1504713593291, JMSType=null, JMSXGroupID=null, JMSXUserID=null}
BodyType String
Body <root><row><ExternalId/><InternalId>370</InternalId><Account>{"name":"11000 Accounts receivable, net","internalId":"11","externalId":null,"type":null}</Account><AccountingBookDetailList/><AltHandlingCost/><AltShippingCost/><AmountPaid/><AmountRemaining/><ApprovalStatus/><Balance/><BillAddressList/><BillingAccount/><BillingAddress/><BillingSchedule/><Clazz/><ContribPct/><CreatedDate>25-07-2008</CreatedDate><CreatedFrom/><Currency>{"name":"US Dollar","internalId":"1","externalId":null,"type":null}</Currency><CurrencyName>US Dollar</CurrencyName><CustomForm/><DeferredRevenue>0.0</DeferredRevenue><Department>{"name":"140-Inside","internalId":"4","externalId":null,"type":null}</Department><DiscountAmount/><DiscountDate/><DiscountItem/><DiscountRate/><DiscountTotal/><DueDate>20-05-2005</DueDate><Email/><EndDate/><Entity>{"name":"Intelliprocess","internalId":"2269","externalId":null,"type":null}</Entity><EstGrossProfit/><EstGrossProfitPercent/><ExchangeRate>1.0</ExchangeRate><ExcludeCommission/><ExpCostDiscAmount/><ExpCostDiscPrint>false</ExpCostDiscPrint><ExpCostDiscRate/><ExpCostDiscTax1Amt/><ExpCostDiscTaxable>false</ExpCostDiscTaxable><ExpCostDiscount/><ExpCostList/><ExpCostTaxCode/><ExpCostTaxRate1/><ExpCostTaxRate2/><Fax/><Fob/><GiftCertApplied/><GiftCertRedemptionList/><HandlingCost/><HandlingTax1Rate/><HandlingTax2Rate/><HandlingTaxCode/><IsTaxable>false</IsTaxable><ItemCostDiscAmount/><ItemCostDiscPrint>false</ItemCostDiscPrint><ItemCostDiscRate/><ItemCostDiscTax1Amt/><ItemCostDiscTaxable>false</ItemCostDiscTaxable><ItemCostDiscount/><ItemCostList/><ItemCostTaxCode/><ItemCostTaxRate1/><ItemCostTaxRate2/><ItemList/><Job/><LastModifiedDate>28-07-2008</LastModifiedDate><LeadSource/><LinkedTrackingNumbers/><Location/><Memo/><Message/><MessageSel/><NextApprover/><OnCreditHold/><Opportunity/><OtherRefNum/><Partner/><PartnersList/><PostingPeriod>{"name":"May 2005","internalId":"42","externalId":null,"type":null}</PostingPeriod><PromoCode/><PromotionsList/><RecognizedRevenue>1439.2</RecognizedRevenue><RecurringBill/><RevRecEndDate/><RevRecOnRevCommitment/><RevRecSchedule/><RevRecStartDate/><RevenueStatus>_completed</RevenueStatus><SalesEffectiveDate>20-05-2005</SalesEffectiveDate><SalesGroup/><SalesRep>{"name":"EMP01021","internalId":"447","externalId":null,"type":null}</SalesRep><SalesTeamList/><ShipAddressList/><ShipDate/><ShipGroupList/><ShipIsResidential/><ShipMethod>{"name":"Download","internalId":"4","externalId":null,"type":null}</ShipMethod><ShippingAddress/><ShippingCost/><ShippingTax1Rate/><ShippingTax2Rate/><ShippingTaxCode/><Source>QuickBooks</Source><StartDate/><Status>Paid In Full</Status><SubTotal>1799.0</SubTotal><Subsidiary>{"name":"foo","internalId":"1","externalId":null,"type":null}</Subsidiary><SyncPartnerTeams/><SyncSalesTeams/><Tax2Total/><TaxItem>{"name":"Out of State","internalId":"32","externalId":null,"type":null}</TaxItem><TaxRate>0.0</TaxRate><TaxTotal/><Terms>{"name":"Credit Card","internalId":"3","externalId":null,"type":null}</Terms><TimeDiscAmount/><TimeDiscPrint/><TimeDiscRate/><TimeDiscTax1Amt/><TimeDiscTaxable/><TimeDiscount/><TimeList/><TimeTaxCode/><TimeTaxRate1/><TimeTaxRate2/><ToBeEmailed>false</ToBeEmailed><ToBeFaxed>false</ToBeFaxed><ToBePrinted>false</ToBePrinted><Total>1799.0</Total><TotalCostEstimate/><TrackingNumbers/><TranDate>20-05-2005</TranDate><TranId>1000584</TranId><TranIsVsoeBundle/><VatRegNum/><VsoeAutoCalc/></row></root>
]

Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.component.cxf.CxfOperationException: JAXRS operation failed invoking cMQConnectionFactory1://queue:NS_Invoices with statusCode: 404
at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.populateCxfRsProducerException(CxfRsProducer.java:419)
at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.invokeHttpClient(CxfRsProducer.java:232)
at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.process(CxfRsProducer.java:89)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)
at local_project.invoice_channel_to_sfdc_0_1.Invoice_channel_to_SFDC$3$1$1.process(Invoice_channel_to_SFDC.java:212)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:112)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:689)
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:649)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:619)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:307)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:245)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1144)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1136)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1033)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[WARN ]: org.apache.camel.component.jms.EndpointMessageListener - Execution of JMS message listener failed. Caused by: [org.apache.camel.RuntimeCamelException - org.apache.camel.component.cxf.CxfOperationException: JAXRS operation failed invoking cMQConnectionFactory1://queue:NS_Invoices with statusCode: 404]
org.apache.camel.RuntimeCamelException: org.apache.camel.component.cxf.CxfOperationException: JAXRS operation failed invoking cMQConnectionFactory1://queue:NS_Invoices with statusCode: 404
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1652)
at org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:195)
at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:116)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:689)
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:649)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:619)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:307)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:245)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1144)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1136)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1033)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.camel.component.cxf.CxfOperationException: JAXRS operation failed invoking cMQConnectionFactory1://queue:NS_Invoices with statusCode: 404
at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.populateCxfRsProducerException(CxfRsProducer.java:419)
at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.invokeHttpClient(CxfRsProducer.java:232)
at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.process(CxfRsProducer.java:89)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)
at local_project.invoice_channel_to_sfdc_0_1.Invoice_channel_to_SFDC$3$1$1.process(Invoice_channel_to_SFDC.java:212)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:112)
... 11 more

  • ESB
1 REPLY
Moderator

Re: Talend ESB: CRest consumer: fails with "JAXRS operation failed invoking cMQConnectionFactory1://queue:NS_Invoices with statusCode: 404"

Hello,

From your screenshot, you set cREST as the service consumer. Could you please show us your REST service defined using tRESTRequest?

The URL of the service http://localhost:8089/customers is Ok with you?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.