Mirth Connect
  1. Mirth Connect
  2. MIRTH-4366

Admin Launcher logs show an error about a too-large preferences JSON blob

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: AL 1.1.0
    • Component/s: Administrator Launcher
    • Labels:
      None
    • Operating System:
      Mac OS X
    • Database:
      PostgreSQL

      Description

      The MC Launcher logs show a problem saving preferences because the JSON blob is too large. This launcher has 18 MC entries saved in it. This error does not appear to cause any settings to not save.

      I have reviewed the full JSON blob and I do not see any problems like a manual edit. Its simply the size.

      {PATH=/usr/bin:/bin:/usr/sbin:/sbin, JAVA_MAIN_CLASS_6461=com.install4j.runtime.launcher.MacLauncher, MC_EXTRA_CLASSPATH2=../../ca ...REMOVED LONG CLASSPATH... d.jar, INSTALL4J_JAVA_HOME_OVERRIDE=../../../../Plugins/jre.bundle/Contents/Home/jre, INSTALL4J_ADD_VM_PARAMS=-Xmx2g
      -Xdock:icon=launcher.ico
      , APP_ICON_6461=/Applications/Mirth Connect Administrator Launcher.app/Contents/Resources/app.icns, USER=jon.bartels, LANG=en_US.UTF-8, TMPDIR=/var/folders/nr/3v1x04xn1dqgt9xzrg3m4xgm0000gn/T/, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.ZPyOMlnVv3/Listeners, EXE4J_JAVA_HOME=../../../../Plugins/jre.bundle/Contents/Home/jre, XPC_FLAGS=0x0, APP_NAME_6461=Mirth Connect Administrator Launcher, __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.KcpKgZODyz/Render, LOGNAME=jon.bartels, XPC_SERVICE_NAME=com.install4j.0730-6030-4034-5735.60.9200, HOME=/Users/jon.bartels}
      ERROR 2019-01-16 17:19:16,232 [JavaFX Application Thread] com.mirth.connect.client.launcher.MirthClientLauncher: Unable to save connections to preferences.
      java.lang.IllegalArgumentException: Value too long: [{"id":"bc984f2 ... REMOVED LOTS OF DATA ... seLegacyDHSettings":false}]
      	at java.util.prefs.AbstractPreferences.put(AbstractPreferences.java:245)
      	at com.mirth.connect.client.launcher.MirthClientLauncher.e(SourceFile:1367)
      	at com.mirth.connect.client.launcher.MirthClientLauncher.b(SourceFile:1188)
      	at com.mirth.connect.client.launcher.MirthClientLauncher.a(SourceFile:103)
      

        Activity

        Hide
        Jon Bartels added a comment -

        https://docs.oracle.com/javase/7/docs/api/java/util/prefs/Preferences.html#MAX_VALUE_LENGTH seems to suggest that this value is capped at 8192 characters.

        In my case I have a few entries with “sslCipherSuites” set to a long, non default value which is making it long. I have tried setting these back to the default but the errors persist. This error does not appear harmful my connections still save and work as expected.

        I think possible solutions might be:

        • reduce the log level for this error
        • dont save the preference (its read from disk anyway innit?)
        • compress the JSON
        Show
        Jon Bartels added a comment - https://docs.oracle.com/javase/7/docs/api/java/util/prefs/Preferences.html#MAX_VALUE_LENGTH seems to suggest that this value is capped at 8192 characters. In my case I have a few entries with “sslCipherSuites” set to a long, non default value which is making it long. I have tried setting these back to the default but the errors persist. This error does not appear harmful my connections still save and work as expected. I think possible solutions might be: reduce the log level for this error dont save the preference (its read from disk anyway innit?) compress the JSON

          People

          • Assignee:
            Unassigned
            Reporter:
            Jon Bartels
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: