Skip to content

Can no longer run phoebus at SNS because preference check limits the size of all preferences #3763

@kasemir

Description

@kasemir

#3740 added this to take a snapshot of all settings in the Launcher:

Preferences.userRoot().put(SETTINGS_SNAPSHOT, prefsBuf.toString());

That bombs like this

java.lang.IllegalArgumentException: Value too long: # Preference settings<br/>
...
# End.<br/>
	at java.prefs/java.util.prefs.AbstractPreferences.put(AbstractPreferences.java:248)
	at org.phoebus.product.Launcher.loadSettings(Launcher.java:233)
	at org.phoebus.product.Launcher.main(Launcher.java:140)

because java.util.prefs.AbstractPreferences.put(AbstractPreferences.java:248) looks like this

   public void put(String key, String value) {
...
        if (value.length() > MAX_VALUE_LENGTH)
            throw new IllegalArgumentException("Value too long: "+value);
...

with a MAX_VALUE_LENGTH of

   /**
     * Maximum length of string allowed as a value (8192 characters).
     */
    public static final int MAX_VALUE_LENGTH = 8*1024;

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions