【问题标题】:Cannot select in SQLite database using Pentaho Data Integration : java.sql.SQLException: ResultSet closed无法使用 Pentaho 数据集成在 SQLite 数据库中选择:java.sql.SQLException: ResultSet closed
【发布时间】:2014-05-26 14:20:30
【问题描述】:

我正在尝试使用 SQLite 数据库在 Pentaho 数据集成中进行表输入步骤。连接似乎很好...

Connection to database [Volp_2] is OK.
Hostname       : C:\Users\Aluno\Apps\VOLP\BD\volp.db
Port           : -1
Database name  : *****

...但通过表格输入步骤预览前 1000 行

2014/05/26 11:18:14 - 表 input.0 - 错误(版本 5.0.1-stable,buildguy 从 2013-11-15_16-08-58 构建 1):Erro inesperado 2014/05/26 11:18:14 - 表 input.0 - 错误(版本 5.0.1-stable,buildguy 从 2013-11-15_16-08-58 构建 1):org.pentaho.di.core.exception .KettleDatabaseException: 2014/05/26 11:18:14 - 表 input.0 - 执行 SQL 时发生错误: 2014/05/26 11:18:14 - 表 input.0 - 从 palavras 中选择名称 2014/05/26 11:18:14 - 表 input.0 - [SQLITE_ERROR] SQL 错误或缺少数据库(没有这样的表:palavras) 2014/05/26 11:18:14 - 表格输入.0 - 2014/05/26 11:18:14 - 表 input.0 - 在 org.pentaho.di.core.database.Database.openQuery(Database.java:1641) 2014/05/26 11:18:14 - 表 input.0 - 在 org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:233) 2014/05/26 11:18:14 - 表 input.0 - 在 org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:143) 2014/05/26 11:18:14 - 表 input.0 - 在 org.pentaho.di.trans.step.RunThread.run(RunThread.java:60) 2014/05/26 11:18:14 - 表 input.0 - 在 java.lang.Thread.run(Thread.java:724) 2014/05/26 11:18:14 - 表 input.0 - 原因:java.sql.SQLException:[SQLITE_ERROR] SQL 错误或缺少数据库(没有这样的表:palavras) 2014/05/26 11:18:14 - 表 input.0 - 在 org.sqlite.DB.newSQLException(DB.java:383) 2014/05/26 11:18:14 - 表 input.0 - 在 org.sqlite.DB.newSQLException(DB.java:387) 2014/05/26 11:18:14 - 表 input.0 - 在 org.sqlite.DB.throwex(DB.java:374) 2014/05/26 11:18:14 - 表 input.0 - 在 org.sqlite.NativeDB.prepare(本机方法) 2014/05/26 11:18:14 - 表 input.0 - 在 org.sqlite.DB.prepare(DB.java:123) 2014/05/26 11:18:14 - 表 input.0 - 在 org.sqlite.Stmt.executeQuery(Stmt.java:121) 2014/05/26 11:18:14 - 表 input.0 - 在 org.pentaho.di.core.database.Database.openQuery(Database.java:1630) 2014/05/26 11:18:14 - 表 input.0 - ... 还有 4 个 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr :应用程序 - 错误(版本 5.0.1-stable,buildguy 于 2013-11-15_16-08-58 构建 1) :尝试停止转换时出现问题:org.pentaho.di.core.exception.KettleDatabaseException: 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - 错误取消声明 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - ResultSet 关闭 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr :应用程序 - 错误(版本 5.0.1-stable,buildguy 于 2013-11-15_16-08-58 构建 1) : org.pentaho.di.core.exception.KettleDatabaseException: 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - 错误取消声明 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : App - ResultSet 关闭 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr :应用程序 - 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : 应用程序 - 在 org.pentaho.di.core.database.Database.cancelStatement(Database.java:664) 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : 应用程序 - 在 org.pentaho.di.core.database.Database.cancelQuery(Database.java:646) 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : 应用程序 - 在 org.pentaho.di.trans.steps.tableinput.TableInput.stopRunning(TableInput.java:303) 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : 应用程序 - 在 org.pentaho.di.trans.Trans.stopAll(Trans.java:1729) 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : 应用程序 - 在 org.pentaho.di.trans.step.BaseStep.stopAll(BaseStep.java:2605) 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : 应用程序 - 在 org.pentaho.di.trans.step.RunThread.run(RunThread.java:95) 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : 应用程序 - 在 java.lang.Thread.run(Thread.java:724) 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr:应用程序 - 由:java.sql.SQLException:ResultSet 关闭 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : 应用程序 - 在 org.sqlite.RS.checkOpen(RS.java:63) 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : 应用程序 - 在 org.sqlite.Stmt.cancel(Stmt.java:254) 2014/05/26 11:18:14 - C:\Users\Aluno\Apps\App.ktr : 应用程序 - 在 org.pentaho.di.core.database.Database.cancelStatement(Database.java:659)

我做错了什么?谁能帮帮我?

【问题讨论】:

    标签: sqlite pentaho kettle


    【解决方案1】:

    这已经在 https://gobansaor.wordpress.com/2006/12/18/sqlite-jdbc-and-kettle-pentaho-data-integration-etl/

    如果文章被删除,以下是步骤:

    1. Within SPOON, make a new connection using for example a Table Input step.
    2. In the General tab, pick “Generic database” from the list of connection types.
    3. Pick “Native(JDBC)” from the Method of Access list.
    No further information required on this tab, go to the Generic tab.
    4. In the URL field, enter “jdbc:sqlite:c:\mydata\mydatabase.db” where c:\mydata\mydatabase.db is the SQLite database you wish to connect to.
    5. In the Driver class field, enter “org.sqlite.JDBC”.
    

    以前包含 JDBC 类的 jar 文件必须保存到 data-integration\lib 文件夹中。

    【讨论】:

      【解决方案2】:

      这个错误看起来像原因:

      select nome from palavras
      

      既然是抱怨表不存在...

      您确定该表拼写正确还是有关联的数据库名称?如果直接连接 sqlite3 并运行查询,这个查询是否有效?

      【讨论】:

        【解决方案3】:

        我也有同样的问题,对我来说正确答案来自Mario.Cadiz(对不起,我没有 cmets 的声誉)

        我定义了两个连接,第一个是 sqlite 类型,第二个是通用数据库。

        sqlite 类型

        • 主机名:jdbc:sqlite:/home/jose/demo.db
        • 数据库名称:demo
        • 端口:
        • 用户名:
        • 密码:

        我已正确测试连接,但探索功能不显示任何表格

        通用数据库类型

        • 方言:通用数据库
        • 自定义连接 URL:jdbc:sqlite:/home/jose/demo.db
        • 自定义驱动类名:org.sqlite.JDBC
        • 用户名:
        • 密码:

        Test和Explore函数都对,我可以浏览数据库中的所有表。

        PDI 版本 9.2.0.0-290 (Ubuntu 20.04)
        该版本的 pdi(lib 目录)已经安装了 sqlite 驱动程序

        【讨论】:

          猜你喜欢
          • 2021-03-31
          • 1970-01-01
          • 1970-01-01
          • 2018-07-03
          • 1970-01-01
          • 2014-12-17
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多