windghost817
windghost817
2018-06-22 05:24
采纳率: 57.9%
浏览 1.8k
已采纳

kettle中使用了 js脚本的firetodb方法 但是一直报错提示链接找不到 为什么?

测试内容
var DBconnection = "dev";
var SQLstatement = "select count(*) from lh_bond_issuer";
var xArr = fireToDB(DBconnection, SQLstatement);

报错

2018/06/22 13:25:56 - JavaScript代码.0 - org.mozilla.javascript.EvaluatorException: Database connection not found: dev (script#3) (script#3)
2018/06/22 13:25:56 - JavaScript代码.0 -
2018/06/22 13:25:56 - JavaScript代码.0 - at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:475)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.processRow(ScriptValuesMod.java:541)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2018/06/22 13:25:56 - JavaScript代码.0 - at java.lang.Thread.run(Thread.java:745)
2018/06/22 13:25:56 - JavaScript代码.0 - Caused by: org.mozilla.javascript.EvaluatorException: org.mozilla.javascript.EvaluatorException: Database connection not found: dev (script#3) (script#3)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.Context.reportRuntimeError(Context.java:945)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1001)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesAddedFunctions.fireToDB(ScriptValuesAddedFunctions.java:550)
2018/06/22 13:25:56 - JavaScript代码.0 - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2018/06/22 13:25:56 - JavaScript代码.0 - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2018/06/22 13:25:56 - JavaScript代码.0 - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2018/06/22 13:25:56 - JavaScript代码.0 - at java.lang.reflect.Method.invoke(Method.java:497)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:413)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.gen.script_3._c_script_0(script:3)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.gen.script_3.call(script)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.gen.script_3.call(script)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.mozilla.javascript.gen.script_3.exec(script)
2018/06/22 13:25:56 - JavaScript代码.0 - at org.pentaho.di.trans.steps.scriptvalues_mod.ScriptValuesMod.addValues(ScriptValuesMod.java:388)

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

相关推荐