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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend tSalesforceInput problem with number Format

We are using talend to migrate some data from salesforce towards our legacy database.

We had nor problems with our first Objects from salesforce. The problems appears, when I try to import a new onject via talend metadata -> retrieve salesforce modules.

Now I get the following error message:

Save failed!
org.eclipse.core.runtime.CoreException: Error when saving the connection
at org.talend.repository.generic.ui.GenericConnWizard$1.run(GenericConnWizard.java:295)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.talend.repository.generic.ui.GenericConnWizard.createOrUpdateConnectionItem(GenericConnWizard.java:303)
at org.talend.repository.generic.ui.GenericConnWizard.performFinish(GenericConnWizard.java:258)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:853)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:438)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
at org.eclipse.jface.window.Window.open(Window.java:808)
at org.talend.repository.generic.action.GenericAction.doRun(GenericAction.java:71)
at org.talend.repository.ui.actions.AContextualAction$2.run(AContextualAction.java:630)
at org.talend.repository.RepositoryWorkUnit.executeRun(RepositoryWorkUnit.java:99)
at org.talend.core.repository.model.AbstractRepositoryFactory.executeRepositoryWorkUnit(AbstractRepositoryFactory.java:258)
at org.talend.repository.localprovider.model.LocalRepositoryFactory.executeRepositoryWorkUnit(LocalRepositoryFactory.java:3420)
at org.talend.core.repository.model.ProxyRepositoryFactory.executeRepositoryWorkUnit(ProxyRepositoryFactory.java:2247)
at org.talend.repository.ui.actions.AContextualAction.run(AContextualAction.java:639)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:519)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.talend.rcp.intro.Application.start(Application.java:265)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: org.talend.daikon.exception.TalendRuntimeException: FAILED_INVOKE_METHOD:{class=org.talend.components.salesforce.SalesforceModuleListProperties, method=afterFormFinishMain}
at org.talend.daikon.properties.PropertiesDynamicMethodHelper.doInvoke(PropertiesDynamicMethodHelper.java:109)
at org.talend.daikon.properties.PropertiesDynamicMethodHelper.afterFormFinish(PropertiesDynamicMethodHelper.java:323)
at org.talend.daikon.properties.service.PropertiesServiceImpl.afterFormFinish(PropertiesServiceImpl.java:135)
at org.talend.components.api.service.internal.osgi.ComponentServiceOsgi.afterFormFinish(ComponentServiceOsgi.java:178)
at org.talend.repository.generic.ui.GenericConnWizard$1.run(GenericConnWizard.java:291)
... 52 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.talend.daikon.properties.PropertiesDynamicMethodHelper.doInvoke(PropertiesDynamicMethodHelper.java:105)
... 56 more
Caused by: java.lang.NumberFormatException: For input string: "NOW()- (NOW()-1)"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at java.lang.Double.valueOf(Double.java:502)
at org.apache.avro.Schema.parse(Schema.java:1279)
at org.apache.avro.Schema$Parser.parse(Schema.java:1032)
at org.apache.avro.Schema$Parser.parse(Schema.java:1020)
at org.talend.designer.core.generic.utils.SchemaUtils.createSchema(SchemaUtils.java:226)
at org.talend.repository.generic.persistence.GenericRepository.storeProperties(GenericRepository.java:79)
at org.talend.repository.generic.persistence.GenericRepository.storeProperties(GenericRepository.java:1)
at org.talend.components.salesforce.SalesforceModuleListProperties.afterFormFinishMain(SalesforceModuleListProperties.java:119)
... 61 more

 

After reading through it, I think the problem is, that a numeric field in salesforce has set the defaultvalue to now()-(now()-1)). In Salesforce this just returns 1. But I think this is some salesforce "magic" because documentation states that now() returns a date (https://help.salesforce.com/articleView?id=formula_using_date_datetime.htm&type=5). On the other hand documentation states that substracting two dates from each others give back a numeric value of days between the dates: https://help.salesforce.com/articleView?id=formula_using_date_datetime.htm&type=5 

Problem now is that this is a field from a managed app, so I am not able to change the default. 

Does anyone have any suggestion how to solve the problem?

 

Thanks in advance

Tobias

Labels (5)
2 Replies
Anonymous
Not applicable
Author

Hi tott

Which version are you using? I found a similar topic,

https://community.talend.com/t5/Design-and-Development/Salesforce-Metadata-Error-when-saving-the-con...

For the function expression, I think you need to open a jira issue to our R&D team, our developers will investigate how to solve it. 

 

Regards

Shong

 

Anonymous
Not applicable
Author

Hi Shong,

 

using 7.0.1

We tried the same with older versions, too but without success.

The other case sounds similar, but I do not know, if it is exaclty the same problem.

I think I cannot open a ticket in your jira, at least I do not know credentials.

 

Best regards

 

Tobias