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

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日

    悬赏问题

    • ¥15 回答几个问题 关于数据库
    • ¥15 设计程序(标签-STM32|关键词-工作模式)
    • ¥15 51单片机串口通信问题,未完成且要修改
    • ¥15 百鸡问题 c++编程问题(相关搜索:输出数据)
    • ¥30 如何在CMD中设置代理
    • ¥15 我有一块薛定谔的硬盘
    • ¥15 微信小游戏开发2D碰撞检测问题
    • ¥30 MapReduce案例实践(实验过程需要截图加文字)
    • ¥30 链表、二叉树的应用和算法设计
    • ¥15 R语言批量修改csv文件中的某一列