韭菜盒子123 2022-04-11 18:06 采纳率: 100%
浏览 96
已结题

kettle中mysql连接JNDI的问题

提示可以正确连接到数据库,但是无法读取库中的表

java.lang.reflect.InvocationTargetException: 从数据库中获取信息时发生错误: org.pentaho.di.core.exception.KettleDatabaseException: 
因为错误不能提取数据库信息

 An error occurred executing SQL: 
 SELECT DISTINCT DECODE(package_name, NULL, '', package_name||'.') || object_name FROM user_arguments ORDE R BY 1
Incorrect parameter count in the call to native function 'DECODE'


    at org.pentaho.di.ui.core.database.dialog.GetDatabaseInfoProgressDialog$1.run(GetDatabaseInfoProgressDialog.java:67)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 
因为错误不能提取数据库信息

An error occurred executing SQL: 
SELECT DISTINCT DECODE(package_name, NULL, '', package_name||'.') || object_name FROM user_arguments ORDER BY 1
Incorrect parameter count in the call to native function 'DECODE'


    at org.pentaho.di.core.database.DatabaseMetaInformation.getData(DatabaseMetaInformation.java:413)
    at org.pentaho.di.ui.core.database.dialog.GetDatabaseInfoProgressDialog$1.run(GetDatabaseInfoProgressDialog.java:65)
    ... 1 more
Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 
An error occurred executing SQL: 
SELECT DISTINCT DECODE(package_name, NULL, '', package_name||'.') || object_name FROM user_arguments ORDER BY 1
Incorrect parameter count in the call to native function 'DECODE'

    at org.pentaho.di.core.database.Database.openQuery(Database.java:1763)
    at org.pentaho.di.core.database.Database.getRows(Database.java:3787)
    at org.pentaho.di.core.database.Database.getRows(Database.java:3765)
    at org.pentaho.di.core.database.Database.getRows(Database.java:3750)
    at org.pentaho.di.core.database.Database.getProcedures(Database.java:4284)
    at org.pentaho.di.core.database.DatabaseMetaInformation.getData(DatabaseMetaInformation.java:406)
    ... 2 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Incorrect parameter count in the call to native function 'DECODE'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
    at com.mysql.jdbc.Util.getInstance(Util.java:408)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2675)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2439)
    at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1365)
    at org.pentaho.di.core.database.Database.openQuery(Database.java:1752)
    ... 7 more
  • 写回答

1条回答 默认 最新

  • 韭菜盒子123 2022-04-12 09:31
    关注

    啊我晓得了,脑子坏了..忘记选择数据库类型了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 4月20日
  • 已采纳回答 4月12日
  • 创建了问题 4月11日

悬赏问题

  • ¥20 深信服vpn-2050这台设备如何配置才能成功联网?
  • ¥15 Arduino的wifi连接,如何关闭低功耗模式?
  • ¥15 Android studio 无法定位adb是什么问题?
  • ¥15 C#连接不上服务器,
  • ¥15 angular项目错误
  • ¥20 需要帮我远程操控一下,运行一下我的那个代码,我觉得我无能为力了
  • ¥20 有偿:在ubuntu上安装arduino以及其常用库文件。
  • ¥15 请问用arcgis处理一些数据和图形,通常里面有一个根据点划泰森多边形的命令,直接划的弊端是只能执行一个完整的边界,但是我们有时候会用到需要在有很多边界内利用点来执行划泰森多边形的命令
  • ¥30 在wave2foam中执行setWaveField时遇到了如下的浮点异常问题,请问该如何解决呢?
  • ¥750 关于一道数论方面的问题,求解答!(关键词-数学方法)