[SOLVED] MySQLNonTransientConnectionException

avis1234
avis1234 New Altair Community Member
edited November 5 in Community Q&A
Hello,

I'm using the "Stream Database" operator to get a large table from mysql.
When I try to view the  lower rows of the table in the result view or plot something, I get:


Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Cannot retrieve data from database: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.

I'm on Mac OS X 10.8.3

Any ideas how to fix this?

Thanks!
Tagged:

Answers

  • MariusHelf
    MariusHelf New Altair Community Member
    Hm, I have some ideas where this exception may originate from. Probably the problem is the following: when the process finishes, RapidMiner closes the connection to the streamed database, but it does not have the complete table in memory (that's why you are actually streaming). When you plot something, RapidMiner needs more data from the database, but since the connection is already closed you get that exception.

    Obviously it is a bug, and until it is fixed I suggest you use the Materialize Data operator directly before passing the data to the process output. That will get the complete data such that it can be displayed in the results view.
    This has the drawback that you'll have the complete data in memory. If that is too much, you could use the Sample operator prior to Materialize Data.

    Concerning the exception I will create an internal bug report.

    Please let me know if you have any further questions.


    Best regards,
    Marius
  • avis1234
    avis1234 New Altair Community Member
    Thank you!
    Your ideas are working and enabled me to create a quick fix at this stage.
    Will appreciate being notified if possible when a new version with a full fix is available.

    Best,

    Avi.