Le 04/09/2018 à 15:57, Matjaz Premerl a écrit :
> Hi,
>
> Within the sample environment you provide in the folder
> lsc-2.1.4/sample/hsqldb I want to try to execute some external script.
> I want to follow your example from the internet with file test.js.
> Currently I've put in the folder:
> lsc-2.1.4/sample/hsqldb/etc
>
> The file test.js just has a dummy method:
> function test() {
> return "test-->";
> }
>
> Then I run the sync like that:
> bin/lsc-sample --run
>
> The error message is like below:
> Sep 04 15:54:27 - INFO - Starting sync for MySyncTask
> Sep 04 15:54:29 - ERROR - Fail to compute expression:
> test()+srcBean.getDatasetFirstValueById(carLicense) on
> [email protected] <mailto:[email protected]>
> Reason: javax.script.ScriptException: ReferenceError: "carLicense" is
> not defined in nashorn:mozilla_compat.js at line number 67
> Sep 04 15:54:29 - ERROR - Error while synchronizing ID
> {[email protected] <mailto:[email protected]>}:
> org.lsc.exception.LscServiceException: javax.script.ScriptException:
> ReferenceError: "carLicense" is not defined in
> nashorn:mozilla_compat.js at line number 67
>
> For thereference, I'm using this Java version on Ubuntu 16.0.4
> openjdk version "1.8.0_181"
> OpenJDK Runtime Environment (build
> 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13)
> OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
>
> Can you please help me with some advice how to resolve this issue?
Hello,
you need to use quotes around "carLicense":
test()+srcBean.getDatasetFirstValueById("carLicense")
The expression should be a valid javascript code.
--
Clément Oudot | Identity Solutions Manager
[email protected]
Worteks | https://www.worteks.com
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
[email protected]
https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users