US and Worldwide: +1 (866) 660-7555
+ Reply to Thread
Results 1 to 9 of 9

Thread: Error: Multiple Connections open ... How to solve?

  1. #1
    Join Date
    Aug 2008
    Posts
    334

    Default Error: Multiple Connections open ... How to solve?

    Hi,
    The last 2 weeks I have spend with fixing problems in a more or less complex transformation and I really have fix this now. I have a lot of steps in one transformation and connect to two databases. When I run the transformation on its own, it works in most cases, but when I run it dynamically (I use the same transformation over and over again by feeding in variables - similar to the 'process all tables' example), then I get following error:

    No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.

    So, my question is:
    - do I have to split this transformation into more smaller transformations so that I can overcome this problem? (I cannot use 'unique conenctions' in one transformation because I connect to two databases).
    What am I doing wrong here?

    Here are all my steps:
    The main transaction

    Process one table

    Process all tables


    I would really appreciate if somebody could tell me how to fix this!
    Thanks,
    Diddy

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    You can use "unique connections" ... the uniqueness only applies to connections to the same database of course (the option was also renamed in 3.2 to something ""transactional transformations" or so): it just means that instead of a step opening its own connection by default, it will check whether a certain connection is already open and reuse that.

    You could have done a search on this forum on "No statements may be issued when any streaming result sets are open and in use on a given connection". There are/were some more people with your MySql problem.

    You can try to switch off "Use result streaming cursor" on the connection dialog tab of your MySql Connection.

    Regards,
    Sven

  3. #3
    Join Date
    Aug 2008
    Posts
    334

    Default

    Hi Sven,
    Thanks a lot for your reply!
    I applied the changes ('unique connection', switch off "Use result streaming cursor"), but now I get the error:

    Streaming result set com.mysql.jdbc.RowDataDynamic@18f307 is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.
    Caused by: java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@18f307 is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.


    (This happened the last time as well).
    So, can you please tell me what else I am doing wrong? I would really be thankful if we could solve this issue.
    Best regards,
    Diddy

  4. #4
    Join Date
    May 2006
    Posts
    4,882

    Default

    And now you need more of a MySql expert than me ... from memory MySql doesn't implement something they had better implemented.... and this now bites you in the a**.

    Regards,
    Sven

  5. #5
    Join Date
    Aug 2008
    Posts
    334

    Default

    Ok, thanks Sven! Can anybody else please help me with this specific problem?

  6. #6
    Join Date
    Nov 1999
    Posts
    7,251

    Default

    Well, your only option left is to disable the streaming option for your MySQL connection.
    Matt Casters, Chief Data Integration
    Pentaho, Open Source Business Intelligence
    http://www.pentaho.org -- mcasters@pentaho.org

    Author of the upcoming book Pentaho Kettle Solutions by Wiley. Release date: mid-September 2010.

    Join us on IRC server Freenode.net, channel ##pentaho

  7. #7
    Join Date
    Aug 2008
    Posts
    334

    Default

    Hi Matt,

    WOW!!! IT IS WORKING NOW!!!

    Thanks a lot for your answer!
    I have set all to
    Extra attribute [STREAM_RESULTS] = N
    (Use result streaming cursor = No)
    Best regards,
    Diddy
    Last edited by diddy; 03-30-2009 at 10:17 AM.

  8. #8
    Join Date
    Aug 2008
    Posts
    334

    Default Problem Summary and Solutions

    If somebody else should once have the same problem, here is the summary:

    Error Message:
    No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.

    You can avoid this by going the the transaction settings (CTRL+T) /Miscellenious and click on 'Make the transaction database transactional'. This basically creates unique connections to the database, because without this each step would create its own conenction to the database.

    Error Message:
    Streaming result set com.mysql.jdbc.RowDataDynamic@18f307 is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.
    Caused by: java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@18f307 is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.

    You can solve this by switching of 'Use result streaming cursor'. The data will not be streamed anymore, but instead, all loaded/written in one go.

  9. #9
    Join Date
    Nov 1999
    Posts
    7,251

    Default

    Please note that the last bit of information is specific to MySQL.
    Matt Casters, Chief Data Integration
    Pentaho, Open Source Business Intelligence
    http://www.pentaho.org -- mcasters@pentaho.org

    Author of the upcoming book Pentaho Kettle Solutions by Wiley. Release date: mid-September 2010.

    Join us on IRC server Freenode.net, channel ##pentaho

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts