rbeckman-nextgen / test-mc3

0 stars 0 forks source link

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

Closed rbeckman-nextgen closed 4 years ago

rbeckman-nextgen commented 4 years ago

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)

Imported Issue. Original Details: Jira Issue Key: MIRTH-4366 Reporter: jbartels Created: 2019-01-17T14:54:01.000-0800

rbeckman-nextgen commented 4 years ago

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:

Imported Comment. Original Details: Author: jbartels Created: 2019-01-17T15:04:09.000-0800