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个回答

qianyuqianxun_1991
qianyuqianxun_1991 回复windghost817: 亲,你是怎么解决的,我也遇到这个问题,连接的数据库名称都没有问题,为什么就会报未找到数据库的错误呢?谢谢了
2 年多之前 回复
windghost817
windghost817 不是我要问的,不过自己也解决了。送分
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐