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

Problems after reading file as String

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

  • Problems after reading file as String

    Hello all,

    I read a file as a String and save the String to a variable. After that I try to create a DB-Connection:
    Code:
    var dbnameandport= FileUtil.read('conf/ltqdbconnection.txt')
    
    var dbConn = DatabaseConnectionFactory.createDatabaseConnection('com.mysql.jdbc.Driver', dbnameandport, 'blu','bla');
    Thats' where I get the Exception:
    Code:
    LINE NUMBER:	10
    DETAILS:	Wrapped java.sql.SQLException: Incorrect database name 'eardata
    '
    	at com.webreach.mirth.server.mule.transformers.JavaScriptTransformer.evaluateScript(JavaScriptTransformer.java:439)
    The file ltqdbconnection.txt(see Attachment) is in the MIRTH_HOME/conf foder.
    Do you know why doesn't Mirth recognize my database?

    THANK YOU AND GREETS,

    Svetlomir

    ltqdbconnection.txt (36 bytes)

    Post edited by: Svetlomir Kasabov, at: 09/13/2008 07:46

  • #2
    Re:Problems after reading file as String

    Sorry, I didn't notice that I have a carriage return after the database-name:
    DETAILS: Wrapped java.sql.SQLException: Incorrect database name 'eardata
    '
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateScript(JavaScriptTransform er.java:439)

    But the method trim() fixed everything

    Thank you anyway

    Svetlomir

    Comment

    Working...
    X