Announcement

Collapse

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

Error question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error question

    I'm tring to write to a SQL DB using an tranformer I have been able to write to a DB but sometimes I get the following error message: Wrapped java.sql.SQLException: Network error IOException: Address already in use: connect.

    Here is my part of my javascript code in the tranformer.


    var dbConn = DatabaseConnectionFactory.createDatabaseConnection (driver,address,username,password);

    var count = 0;


    for each (mrg in msg..MRG)
    {

    var MessageID= channelMap.get('MessageID');

    var PriorPatientIDInternal= msg['MRG'][count]['MRG.1']['MRG.1.1'];
    var PriorAlternatePatientID= msg['MRG'][count]['MRG.2']['MRG.2.1'];
    var PriorPatientAccountNumber= msg['MRG'][count]['MRG.3']['MRG.3.1'];
    var PriorPatientIDExternal= msg['MRG'][count]['MRG.4']['MRG.4.1'];

    var expression = "INSERT IGNORE INTO MRG (MessageID, PriorPatientIDInternal, PriorAlternatePatientID, PriorPatientAccountNumber, PriorPatientIDExternal) values ('" + MessageID + "', '" + PriorPatientIDInternal + "', '" + PriorAlternatePatientID + "', '" + PriorPatientAccountNumber + "', '" + PriorPatientIDExternal + "');";

    var result = dbConn.executeUpdate(expression);

    count++;
    }

    //simply closes the connection to the DB
    dbConn.close();


    Thanks for any help,
    Chad

  • #2
    Re:Error question

    Sorry I don't have an answer for your question, but I have a question myself. When you insert all those variables. don't they come as XML segments. How do you get rid of the quotes
    <><\>
    ????I would like to know how to map in the transformer without getting the quotes . If somebody can send me a sample transformer for mapping

    Comment


    • #3
      Re:Error question

      Hi cward,

      I have the same problem, if you can help me deal.

      My code error is:

      ERROR-406: JDBC Connector error
      java.sql.SQLException: Network error IOException: Address already in use: connect

      Post edited by: jovila, at: 03/26/2008 08:06

      Comment


      • #4
        Re:Error question

        I am having the same issue. Did you guys find a solution?

        Comment


        • #5
          Re:Error question

          Hi aingram,

          I hope that these could help.

          1. Remove the semicolon at the end of your insert statement (loaded at expression variable).
          2. Try removing the line var result = dbConn.executeUpdate(expression); and replace it with dbConn.executeUpdate(expression);


          Good luck!

          Comment

          Working...
          X