Announcement

Collapse
No announcement yet.

Mirth Manager Database URL save incorrect

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

  • Mirth Manager Database URL save incorrect

    Environment: Mirth 1.5 Windows version, Windows Server 2000 SP4, Microsoft SQL Server 2000 SP3, Java Runtime v1.6.0 (build 1.6.0_01-b06)

    Mirth Manager / Database / URL

    The UI shows the database URL in correct format but when saved, the properties file has a backslash ( \\ ) before every colon ( : ) in the url.

    Code:
    File: C:\\Program Files\\Mirth\\conf\\sqlserver-SqlMapConfig.properties
    Code:
    #Wed May 30 11:21:16 EDT 2007
    password=test
    url=jdbc\\:jtds\\:«»sqlserver\\://testserver\\:1433/mirthdb
    driver=net.sourceforge.jtds.jdbc.Driver
    database=sqlserver
    username=sa
    After removing the backslash in the url Mirth 1.5 created entries successfully in mirthdb in SQL Server 2000
    Code:
    url=jdbc:jtds:«»sqlserver://testserver:1433/mirthdb
    Post edited by: nshaik, at: 05/30/2007 09:07

  • #2
    Re:Mirth Manager Database URL save incorrect

    Does this cause a problem when you try to load mirth with database properties saved from the manager? I believe when the properties are loaded, Java automatically strips the slashes. The colons and the equal characters need to be escaped in properties files if they are part of your property value.
    Brendan Haverlock | Mirth Software Engineer | Mirth Corporation

    Comment


    • #3
      Re:Mirth Manager Database URL save incorrect

      I just tried it on 3 different databases including SQL server, and all 3 were able to connect with the properties saved from the manager.
      Brendan Haverlock | Mirth Software Engineer | Mirth Corporation

      Comment


      • #4
        Re:Mirth Manager Database URL save incorrect

        Mirth did not throw any error but the event, messages etc. were not getting populated in the mirthdb database tables in SQL Server 2000.

        I edited the properties file, removed the backslash, restarted mirth and tried few test messages. Mirth then populated data in SQL Server 2000 mirthdb database tables.

        Comment


        • #5
          Re:Mirth Manager Database URL save incorrect

          I still don't see how this is possible. I wrote a unit test that proves that the slashes are stripped when you read in a properties file using the .load() method (which is what both the server manager and server use to read the properties file). Can you try this again and replicate the behavior? It seems kind of weird that you were able to log in and get the channels, etc., yet only messages weren't stored. This may be a different problem with SQL server 2000.
          Brendan Haverlock | Mirth Software Engineer | Mirth Corporation

          Comment


          • #6
            Re:Mirth Manager Database URL save incorrect

            I uninstalled and installed Mirth twice to repeat this test case.

            Conclusion:
            Restart Mirth service after changes to Database setting from Mirth Server Manger
            The sqlserver-SqlMapConfig.properties does not need to be edited to remove backslash.

            Details:

            1. Run mirth-1.5.0.2272-setup.exe / Accept defaults for all screens
            2. Double-click on Mirth Manager tray icon / Database / SQL Server / Enter database server info
            3. Open Mirth Admin / Import 1.4 Channel / Change File Reader location / Save / Deploy
            4. Try sending few test messages
            5. Check EVENT table in MIRTHDB in SQL Server 2000
            6. No records found

            7. Remove messages from Mirth Administrator / Clear Statistics / Close Mirth Admin
            8. Stop Mirth Service / Start Mirth Service

            9. Try sending few test messages
            10. Check EVENT table in MIRTHDB in SQL Server 2000
            11. Found records in EVENT table

            What I did earlier was, after Step 6 above, since there were no records in the EVENT table, I compared the two properties file for SQL Server 2000 and 2005

            The 2005 properties file had the following entry (no backslash) and I made similar change for SQL Server 2000.
            url=jdbc:jtds:sqlserver://localhost:1433/mirthdb
            Stopped and Started Mirth service and it worked. I thought the changes in the properties file made it to work but what is required is restart mirth service after changing the database setting.

            Another Problem Identified when repeating this test case. After step 8 above, opened Mirth Admin, the channel was not found. This happened again when the test case was repeated. I had to import the 1.4 channel again.

            Thanks for your help!

            Comment


            • #7
              Re:Mirth Manager Database URL save incorrect

              That is because you made your channel in the derby database. When you restarted Mirth it switched over to your SQL Server database that does not have the channel that you entered. Remember, any changes that you make with the server manager will require a server restart before they take effect. I'm glad it is not a bug
              Brendan Haverlock | Mirth Software Engineer | Mirth Corporation

              Comment


              • #8
                Re:Mirth Manager Database URL save incorrect

                Thanks again for the reply. I'll make sure I restart Mirth after changes using server manager.

                Enhancement Request:

                Make Mirth Installer request for Database setting during installation.

                This will make the selected database setting to take effect immediately after installation.

                Thanks!

                Comment


                • #9
                  Re:Mirth Manager Database URL save incorrect

                  That is a good idea. I could instead make it so that when you change properties in the server manager and try to press OK, it will prompt you to restart the server. Do you like that idea (I kind of like it better because we would keep everything in the same location instead of having duplicate places to do things)?
                  Brendan Haverlock | Mirth Software Engineer | Mirth Corporation

                  Comment


                  • #10
                    Re:Mirth Manager Database URL save incorrect

                    Yes, that would be nice! Thank you very much!

                    Also, how about a warning message when trying to change the database in Mirth Server Manager?

                    Your existing channels will no longer be available and need to be imported back after restarting Mirth.
                    [Check Box] Do not show this warning again.

                    Comment


                    • #11
                      Re:Mirth Manager Database URL save incorrect

                      Maybe...I think that might be too many prompts
                      Brendan Haverlock | Mirth Software Engineer | Mirth Corporation

                      Comment

                      Working...
                      X
                      😀
                      🥰
                      🤢
                      😎
                      😡
                      👍
                      👎