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

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 cs loadimage运行不了,easyx也下了,没有用
  • ¥15 r包runway详细安装教程
  • ¥15 Html中读取Json文件中数据并制作表格
  • ¥15 谁有RH342练习环境
  • ¥15 STM32F407 DMA中断问题
  • ¥15 uniapp连接阿里云无法发布消息和订阅
  • ¥25 麦当劳点餐系统代码纠错
  • ¥15 轮班监督委员会问题。
  • ¥20 关于变压器的具体案例分析