13 Replies Latest reply on Aug 29, 2017 8:57 AM by Brendan Lee

    WDC Script error only in Tableau Server

    Radu Lucaciu

      Hi all,

       

      I have a simple test WDC that pulls in some data, nothing fancy, just an array of values, no passwords. It works without any issues on Tableau Desktop, however, when I publish it to Tableau Server and try to refresh the extract, I am getting an

      Error executing backgroundjob: :refresh_extracts

      java.util.concurrent.ExecutionException: com.tableausoftware.nativeapi.dll.DataSourceException: Script error.   file:    line: 0

      error: The full stack trace and code are pasted below.

       

      However, there is not enough information to figure out why the script is not running, I am not getting any errors in Tableau Desktop or in the WDC Simulator.

       

      Has anyone encountered this before? Is there any way to get more details on which part of the connector is throwing the error?

       

      Later Edit: I even tried removing all references to jQuery, all API calls (I simply return a static array for getData() and I am getting the same error)

       

      Thank you,
      Radu

       

       

      ERROR com.tableausoftware.backgrounder.runner.BackgroundJobRunner - Error executing backgroundjob: :refresh_extracts

      java.util.concurrent.ExecutionException: com.tableausoftware.nativeapi.dll.DataSourceException: Script error.   file:    line: 0

       

       

          at java.util.concurrent.FutureTask.report(FutureTask.java:122)

          at java.util.concurrent.FutureTask.get(FutureTask.java:206)

          at com.tableausoftware.backgrounder.runner.BackgroundJobRunner.executeNextJob_aroundBody6(BackgroundJobRunner.java:426)

          at com.tableausoftware.backgrounder.runner.BackgroundJobRunner$AjcClosure7.run(BackgroundJobRunner.java:1)

          at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)

          at com.tableausoftware.instrumentation.InstrumentedMethod.instrumentInvocation(InstrumentedMethod.java:66)

          at com.tableausoftware.instrumentation.InstrumentationAspect.aroundAnnotatedMethod(InstrumentationAspect.java:57)

          at com.tableausoftware.backgrounder.runner.BackgroundJobRunner.executeNextJob(BackgroundJobRunner.java:374)

          at com.tableausoftware.backgrounder.runner.BackgroundJobRunner.executeJobs_aroundBody2(BackgroundJobRunner.java:312)

          at com.tableausoftware.backgrounder.runner.BackgroundJobRunner$AjcClosure3.run(BackgroundJobRunner.java:1)

          at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)

          at com.tableausoftware.instrumentation.InstrumentedMethod.instrumentInvocation(InstrumentedMethod.java:66)

          at com.tableausoftware.instrumentation.InstrumentationAspect.aroundAnnotatedMethod(InstrumentationAspect.java:57)

          at com.tableausoftware.backgrounder.runner.BackgroundJobRunner.executeJobs(BackgroundJobRunner.java:287)

          at com.tableausoftware.backgrounder.config.BackgroundJobRunnerSchedulingConfig.lambda$0(BackgroundJobRunnerSchedulingConfig.java:42)

          at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

          at java.lang.Thread.run(Thread.java:745)

      Caused by: com.tableausoftware.nativeapi.dll.DataSourceException: Script error.   file:    line: 0

       

      The code for the connector is pasted below

       

      var API_URL = ''; //Removed for posting on forum

       

      (function() {

        var http;

        var myConnector = tableau.makeConnector();

       

        myConnector.init = function(initCallback) {

            initCallback();

        }

       

        myConnector.getSchema = function (schemaCallback) {

          var cols = [

              { id : "a", alias : "Column A", dataType : tableau.dataTypeEnum.float },

              { id : "b", alias : "Column B", dataType : tableau.dataTypeEnum.float }

          ];

       

          var tableInfo = {

              id : "dbgTable",

              alias : "My Debugging connector data",

              columns : cols

          };

       

          schemaCallback([tableInfo]);

        };

       

        myConnector.getData = function(table, doneCallback) {

          $.getJSON(API_URL + 'arrand', function(resp) {

            tableData = [];

       

            // Iterate over the JSON object

            for (var i = 0, len = resp.length; i < len; i++) {

                tableData.push({

                    "a": resp[i].a,

                    "b": resp[i].b

                });

            }

       

            table.appendRows(tableData);

            doneCallback();

          });

        }; 

       

        tableau.registerConnector(myConnector);

       

        $(document).ready(function () {

          $("#submitButton").click(function () {

            tableau.connectionName = "MyDebug";

            tableau.submit();

          });

        });

       

      })();