骆驼Salesforce组件找不到平台事件对象

时间:2020-05-20 14:07:50

标签: apache-camel salesforce

我已使用camel-salesforce-maven-plugin生成DTO,并成功创建了联系人记录。但是,当我尝试在以下文档上发出事件时:

https://camel.apache.org/components/latest/salesforce-component.html

我收到以下错误:

2020-05-21 13:30:47.844 ERROR 4276 --- [ent@3c50ad4b-22] o.a.c.p.e.DefaultErrorHandler            : Failed delivery for (MessageId: ID-DESKTOP-UO2CP5I-1590033642730-0-7 on ExchangeId: ID-DESKTOP-UO2CP5I-1590033642730-0-7). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.salesforce.api.NoSuchSObjectException: {errors:[{"errorCode":"NOT_FOUND","message":"The requested resource does not exist","fields":null}],statusCode:404}

Message History (complete message history is disabled)
---------------------------------------------------------------------------------------------------------------------------------------
RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
[moodle-event      ] [moodle-event      ] [from[timer://hello?period=2000]                                               ] [        81]
        ...
[moodle-event      ] [to3               ] [salesforce:createSObject?sObjectName=Moodle__e                                ] [         0]

Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------

org.apache.camel.component.salesforce.api.NoSuchSObjectException: {errors:[{"errorCode":"NOT_FOUND","message":"The requested resource does not exist","fields":null}],statusCode:404}
        at org.apache.camel.component.salesforce.internal.client.DefaultRestClient.createRestException(DefaultRestClient.java:110) ~[camel-salesforce-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT]
        at org.apache.camel.component.salesforce.internal.client.AbstractClientBase$1.onComplete(AbstractClientBase.java:231) ~[camel-salesforce-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT]
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:218) ~[jetty-client-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:210) ~[jetty-client-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:543) ~[jetty-client-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:523) ~[jetty-client-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:486) ~[jetty-client-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:326) ~[jetty-client-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.http.HttpParser.parseFields(HttpParser.java:1161) ~[jetty-http-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1534) ~[jetty-http-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:200) ~[jetty-client-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:141) ~[jetty-client-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:75) ~[jetty-client-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133) ~[jetty-client-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:156) ~[jetty-client-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[jetty-io-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[jetty-io-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:543) ~[jetty-io-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:398) ~[jetty-io-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161) ~[jetty-io-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[jetty-io-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) ~[jetty-io-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) ~[jetty-util-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) ~[jetty-util-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) ~[jetty-util-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) ~[jetty-util-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) ~[jetty-util-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) ~[jetty-util-9.4.27.v20200227.jar:9.4.27.v20200227]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) ~[jetty-util-9.4.27.v20200227.jar:9.4.27.v20200227]

这是我使用的代码:

from("timer:hello?period={{timer.period}}").routeId("moodle-event")
    .noStreamCaching()
    .process(exchange ->{
        final Message in = exchange.getIn();

        /*Contact con = new Contact();
        con.setFirstName("Maven");
        con.setLastName("Camel");
        con.setEmail("maven.camel@gmail.com");
        con.setMobilePhone("+61466879506");
        */

        Moodle__e evt = new Moodle__e();
        evt.setData__c("Data from Camel");          
        in.setBody(evt);
    })
    .to("salesforce:createSObject?sObjectName=Moodle__e");

我在Salesforce中仅使用一个String类型的字段Data__c创建了此Moodle__e,并已与其他客户端应用程序成功测试了此事件。

有人可以帮忙吗?谢谢

0 个答案:

没有答案