Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

SQLException: Invalid state, the Connection object

  • Filter
  • Time
  • Show
Clear All
new posts

  • SQLException: Invalid state, the Connection object

    I have 6 channel reader to a database writer channels. i keeping getting an error saying the connection object is closed. the only connection between all the channels is this:
    Same connection string, same database, different table for each channel.

    Sometimes all the channels will function properly, then other times all channels will error out with the error stated. Does anyone know why???? Should I take out the dbConn.close(); line?

    Below is my code and error message.

    Thanks in advance!

    var spParams = "'" + 'GRV3_Midas' + "'" + ', ' + "'" + $('sMessType') + "'" + ', ' + "'" + $('sPID') + "'" + ', ' + "'" + $('sMessage') + "'";
    var expression = "EXEC Database_Transaction " + spParams;   
    // Print the SQL statement for debugging purpose
    //'SQL: ' + expression);
    var dbConn = DatabaseConnectionFactory.createDatabaseConnection('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:«»sqlserver://SERVERNAME:1433/MirthDB;','TEST','TEST');
    //var dbConn = $g('dbMirthArchive')
    var result = dbConn.executeQuery(expression);
    ERROR-406: JDBC Connector error
    ERROR MESSAGE: Error writing to database:
    org.mozilla.javascript.WrappedException: Wrapped java.sql.SQLException: Invalid state, the Connection object is closed. (62a28924-76c1-4726-91b0-26096bdd7b56#15)
    Reid Hospital and Healthcare