java.lang.reflect.InvocationTargetException: Problem encountered getting information from the database: org.pentaho.di.core.exception.KettleDatabaseException: Unable to retrieve database information because of an error An error occurred executing SQL: select proname from pg_proc, pg_user where pg_user.usesysid = pg_proc.proowner and upper(pg_user.usename) = 'MASTER' order by proname Invalid Fetch Size

Pentaho BI Platform Tracking | Mark Kromer | 2 years ago
  1. 0

    The Amazon Redshift team is working on the ODBC & JDBC drivers with Simba. During ODBC driver testing, they have uncovered some issues with the way that we handle max rows when set to zero. See below for details of the Amazon / Simba interaction: Hi Cagri, We’ve determined the issue. It’s a bug in Pentaho where they do not correctly interpret when the attribute SQL_ATTR_MAX_ROWS is set to zero. A max rows value of zero indicates that the driver should retrieve all rows from the database. Pentaho has some code where if the maxRows value is less than some constant for the fetch size, it will set the fetch size to the maxRows value. A value of zero is illegal for the fetch size, so the exception gets thrown. I tried changing the driver to report the max rows to be a non-zero value and Pentaho works correctly. But changing this would probably cause issues in other applications. Thanks, James Hi James, While working on using Pentaho and ODBC which uses 64bits driver and internally uses sun.jdbc.odbc.JdbcOdbcDriver: You may download pentaho: http://community.pentaho.com/ Pentaho uses JDBC as native. I am getting the following errors both with open source driver and Redshift driver: An error occurred executing SQL: select proname from pg_proc, pg_user where pg_user.usesysid = pg_proc.proowner and upper(pg_user.usename) = 'MASTER' order by proname Invalid Fetch Size I have run the same query through ODBCTest and it is working fine. Can you help me identify the issue? Here is the stack trace: java.lang.reflect.InvocationTargetException: Problem encountered getting information from the database: org.pentaho.di.core.exception.KettleDatabaseException: Unable to retrieve database information because of an error An error occurred executing SQL: select proname from pg_proc, pg_user where pg_user.usesysid = pg_proc.proowner and upper(pg_user.usename) = 'MASTER' order by proname Invalid Fetch Size at org.pentaho.di.ui.core.database.dialog.GetDatabaseInfoProgressDialog$1.run(GetDatabaseInfoProgressDialog.java:76) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) Caused by: org.pentaho.di.core.exception.KettleDatabaseException: Unable to retrieve database information because of an error An error occurred executing SQL: select proname from pg_proc, pg_user where pg_user.usesysid = pg_proc.proowner and upper(pg_user.usename) = 'MASTER' order by proname Invalid Fetch Size at org.pentaho.di.core.database.DatabaseMetaInformation.getData(DatabaseMetaInformation.java:401) at org.pentaho.di.ui.core.database.dialog.GetDatabaseInfoProgressDialog$1.run(GetDatabaseInfoProgressDialog.java:72) ... 1 more Caused by: org.pentaho.di.core.exception.KettleDatabaseException: An error occurred executing SQL: select proname from pg_proc, pg_user where pg_user.usesysid = pg_proc.proowner and upper(pg_user.usename) = 'MASTER' order by proname Invalid Fetch Size at org.pentaho.di.core.database.Database.openQuery(Database.java:1641) at org.pentaho.di.core.database.Database.getRows(Database.java:3336) at org.pentaho.di.core.database.Database.getRows(Database.java:3308) at org.pentaho.di.core.database.Database.getRows(Database.java:3289) at org.pentaho.di.core.database.Database.getProcedures(Database.java:3789) at org.pentaho.di.core.database.DatabaseMetaInformation.getData(DatabaseMetaInformation.java:395) ... 2 more Caused by: java.sql.SQLException: Invalid Fetch Size at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(Unknown Source) at org.pentaho.di.core.database.Database.openQuery(Database.java:1622) ... 7 more Thanks, -Cagri

    Pentaho BI Platform Tracking | 2 years ago | Mark Kromer
    java.lang.reflect.InvocationTargetException: Problem encountered getting information from the database: org.pentaho.di.core.exception.KettleDatabaseException: Unable to retrieve database information because of an error An error occurred executing SQL: select proname from pg_proc, pg_user where pg_user.usesysid = pg_proc.proowner and upper(pg_user.usename) = 'MASTER' order by proname Invalid Fetch Size
  2. 0

    The Amazon Redshift team is working on the ODBC & JDBC drivers with Simba. During ODBC driver testing, they have uncovered some issues with the way that we handle max rows when set to zero. See below for details of the Amazon / Simba interaction: Hi Cagri, We’ve determined the issue. It’s a bug in Pentaho where they do not correctly interpret when the attribute SQL_ATTR_MAX_ROWS is set to zero. A max rows value of zero indicates that the driver should retrieve all rows from the database. Pentaho has some code where if the maxRows value is less than some constant for the fetch size, it will set the fetch size to the maxRows value. A value of zero is illegal for the fetch size, so the exception gets thrown. I tried changing the driver to report the max rows to be a non-zero value and Pentaho works correctly. But changing this would probably cause issues in other applications. Thanks, James Hi James, While working on using Pentaho and ODBC which uses 64bits driver and internally uses sun.jdbc.odbc.JdbcOdbcDriver: You may download pentaho: http://community.pentaho.com/ Pentaho uses JDBC as native. I am getting the following errors both with open source driver and Redshift driver: An error occurred executing SQL: select proname from pg_proc, pg_user where pg_user.usesysid = pg_proc.proowner and upper(pg_user.usename) = 'MASTER' order by proname Invalid Fetch Size I have run the same query through ODBCTest and it is working fine. Can you help me identify the issue? Here is the stack trace: java.lang.reflect.InvocationTargetException: Problem encountered getting information from the database: org.pentaho.di.core.exception.KettleDatabaseException: Unable to retrieve database information because of an error An error occurred executing SQL: select proname from pg_proc, pg_user where pg_user.usesysid = pg_proc.proowner and upper(pg_user.usename) = 'MASTER' order by proname Invalid Fetch Size at org.pentaho.di.ui.core.database.dialog.GetDatabaseInfoProgressDialog$1.run(GetDatabaseInfoProgressDialog.java:76) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) Caused by: org.pentaho.di.core.exception.KettleDatabaseException: Unable to retrieve database information because of an error An error occurred executing SQL: select proname from pg_proc, pg_user where pg_user.usesysid = pg_proc.proowner and upper(pg_user.usename) = 'MASTER' order by proname Invalid Fetch Size at org.pentaho.di.core.database.DatabaseMetaInformation.getData(DatabaseMetaInformation.java:401) at org.pentaho.di.ui.core.database.dialog.GetDatabaseInfoProgressDialog$1.run(GetDatabaseInfoProgressDialog.java:72) ... 1 more Caused by: org.pentaho.di.core.exception.KettleDatabaseException: An error occurred executing SQL: select proname from pg_proc, pg_user where pg_user.usesysid = pg_proc.proowner and upper(pg_user.usename) = 'MASTER' order by proname Invalid Fetch Size at org.pentaho.di.core.database.Database.openQuery(Database.java:1641) at org.pentaho.di.core.database.Database.getRows(Database.java:3336) at org.pentaho.di.core.database.Database.getRows(Database.java:3308) at org.pentaho.di.core.database.Database.getRows(Database.java:3289) at org.pentaho.di.core.database.Database.getProcedures(Database.java:3789) at org.pentaho.di.core.database.DatabaseMetaInformation.getData(DatabaseMetaInformation.java:395) ... 2 more Caused by: java.sql.SQLException: Invalid Fetch Size at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(Unknown Source) at org.pentaho.di.core.database.Database.openQuery(Database.java:1622) ... 7 more Thanks, -Cagri

    Pentaho BI Platform Tracking | 2 years ago | Mark Kromer
    java.lang.reflect.InvocationTargetException: Problem encountered getting information from the database: org.pentaho.di.core.exception.KettleDatabaseException: Unable to retrieve database information because of an error An error occurred executing SQL: select proname from pg_proc, pg_user where pg_user.usesysid = pg_proc.proowner and upper(pg_user.usename) = 'MASTER' order by proname Invalid Fetch Size
  3. 0

    DB Connect Input - Query works but Input does not - Question | Splunk Answers

    splunk.com | 6 months ago
    java.sql.SQLException: Invalid Fetch Size
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      Invalid Fetch Size

      at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize()
    2. sun.jdbc.odbc
      JdbcOdbcStatement.setFetchSize
      1. sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(Unknown Source)
      1 frame
    3. org.pentaho.di
      GetDatabaseInfoProgressDialog$1.run
      1. org.pentaho.di.core.database.Database.openQuery(Database.java:1622)
      2. org.pentaho.di.core.database.Database.getRows(Database.java:3336)
      3. org.pentaho.di.core.database.Database.getRows(Database.java:3308)
      4. org.pentaho.di.core.database.Database.getRows(Database.java:3289)
      5. org.pentaho.di.core.database.Database.getProcedures(Database.java:3789)
      6. org.pentaho.di.core.database.DatabaseMetaInformation.getData(DatabaseMetaInformation.java:395)
      7. org.pentaho.di.ui.core.database.dialog.GetDatabaseInfoProgressDialog$1.run(GetDatabaseInfoProgressDialog.java:72)
      7 frames
    4. JFace
      ModalContext$ModalContextThread.run
      1. org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
      1 frame