20 Aug

Alflytics FAQ – SyntaxError: Empty JSON string (script#5) during extraction task

As a result of some feedback from the Community, an issue related to Alflytics has been solved. The issue affected the installation on different URLs from the default one: http://localhost:8080.

In this case, another side effect happened during the extraction, with a result of a failure task with a unclear message SyntaxError: Empty JSON string (script#5).

To solve the issue and the side effect, an updated release has been published including a description of the error as FAQ in the documentation.

Below a detailed description of the error happening during the extraction task. More in detail, during if you experience an error similar to the following, this post can help you to understand (and solve).

2017/08/20 20:00:24 - getQueries.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
 Javascript error:
 SyntaxError: Empty JSON string (script#5)

at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:475)
 at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.processRow(ScriptValuesMod.java:541)
 at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
 at java.lang.Thread.run(Thread.java:748)
 Caused by: org.mozilla.javascript.EcmaError: SyntaxError: Empty JSON string (script#5)
 at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3785)
 at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3763)
 at org.mozilla.javascript.NativeJSON.parse(NativeJSON.java:146)
 at org.mozilla.javascript.NativeJSON.execIdCall(NativeJSON.java:122)
 at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
 at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)
 at org.mozilla.javascript.gen.script_3._c_script_0(script:5)
 at org.mozilla.javascript.gen.script_3.call(script)
 at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
 at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
 at org.mozilla.javascript.gen.script_3.call(script)
 at org.mozilla.javascript.gen.script_3.exec(script)
 at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:388)
 ... 3 more


2017/08/20 20:00:24 - Get queries - ERROR (version, build 1 from 2017-05-16 17.18.02 by buildguy) : Errors detected!
 2017/08/20 20:00:24 - Get queries - Transformation detected one or more steps with errors.
 2017/08/20 20:00:24 - Get queries - Transformation is killing the other steps!
 2017/08/20 20:00:24 - Get queries - ERROR (version, build 1 from 2017-05-16 17.18.02 by buildguy) : Errors detected!
 2017/08/20 20:00:24 - Get all - Starting entry [Write To Log 2]
 2017/08/20 20:00:24 - Query retrieve failure. - Cannot retrieve queries using the Pentaho REST services on 'http://localhost:8080'.
 2017/08/20 20:00:24 - Query retrieve failure. - Please check the correct URL before requesting support.
 2017/08/20 20:00:24 - Query retrieve failure. - If the URL (port included) is wrong, update the ETLs using the Spoon User Interface.

In case you get this error, the Get queries transformation cannot retrieve the query to be executed. Get queries transformation retrieves the query using a Pentaho REST service. By default the installation assumes that Pentaho is available at http://localhost:8080. if you will use a different port (or URL), you have to update the default parameters of the ETLs using Spoon. Then you can launch the extraction again.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.