Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Camel-salesforce component: ERROR "No class found for SObject "Cvent_Event__c" - Found 0 generated classes in packages: [org.apache.camel.salesforce.dto]

Hi, 

 

I am trying to query salesforce using camel-salesforce component's "getSObjectWithId" method.  I generated a salesforce DTO library and specified the DTO package name in cConfig. 

salesforceComponent.setPackages("org.apache.camel.salesforce.dto");

in Dependency tab: 

Added the dto library under "Bundle classpath" and selected it to be included along with the bundle. 

 

This query works fine in Talend studio. But when I deploy the route to Talend runtime server (TAC), execution fails with below error.

Exception Details: org.apache.camel.component.salesforce.api.SalesforceException: Error processing getSObjectWithId: [0] "No class found for SObject Cvent_Event__c" at org.apache.camel.component.salesforce.internal.processor.AbstractRestProcessor.process(AbstractRestProcessor.java:156) [444:ea_cvent_salesforce_integrations.TrainingDataSync_SQStoSFDC:0.6.4] at org.apache.camel.component.salesforce.SalesforceProducer.process(SalesforceProducer.java:100) ....

 

here is what I found. 

 

In Talend studio, camel-salesforce component was able to load all the classes from specified DTO package. i.e

Talend studio has log "[INFO ]: org.apache.camel.component.salesforce.SalesforceComponent - Found 837 generated classes in packages: [org.apache.camel.salesforce.dto]"

 

In the Runtime, I see the log message "[INFO ]: org.apache.camel.component.salesforce.SalesforceComponent - Found 0 generated classes in packages: [org.apache.camel.salesforce.dto]"

 

Any idea why it is not able to load classes from "org.apache.camel.salesforce.dto" package in runtime?

 

camel version: 2.17.6

Talend version: 6.4.1

 

Thanks,

Sowjanya.

 

 

 

 

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hi Sowjanya,

 

I think you did also "import org.apache.camel.component.salesforce.SalesforceComponent" together with salesforceComponent.setPackages("org.apache.camel.salesforce.dto");

 

in the cConfig component, and you have to add the camel-salesforce jar to the lib of cConfig, is it right?

 

But by default if you use cMessageEndpoint + salesforce, then the camel-salesforce bundle with be installed when deploying the Route into Runtime.

335 │ Active │ 50 │ 2.17.6 │ camel-salesforce

 

There is no Import-package defined for "org.apache.camel.salesforce.dto" package in the MANIFEST of camel-salesforce, that's why it complains "No class found for ..."

 

You may try if you can use the "camel-salesforce-alldep-2.17.6.jar" in the cConfig component, so that all the camel-salesforce classes are embeded into the export Route jar (instead of install it as a bundle on Runtime during the deployment)

 

Also maybe you search a bit e.g. from http://camel.apache.org/salesforce, as I'm not so familiar with the salesforce API and DTOs.

 

Thanks.

Xilai