JetBrains/intellij-community · error · IllegalArgumentException

String descriptor value required

Error message

String descriptor value required

What it means

Thrown by LwRbIntroStringProperty.read when reading an intro-string property from form XML: LwXmlReader.getStringDescriptor returns null because none of the value/resource-bundle/key attributes produced a descriptor. Intro-string properties (like radio-button group labels) must resolve to a StringDescriptor, so a null result is rejected with IllegalArgumentException.

Source

Thrown at java/compiler/forms-compiler/src/com/intellij/uiDesigner/lw/LwRbIntroStringProperty.java:22

import com.intellij.uiDesigner.UIFormXmlConstants;
import org.jdom.Element;

public final class LwRbIntroStringProperty extends LwIntrospectedProperty {
  LwRbIntroStringProperty(final String name){
    super(name, String.class.getName());
  }

  /**
   * @return instance of {@link StringDescriptor}
   */
  @Override
  public Object read(final Element element) {
    final StringDescriptor descriptor = LwXmlReader.getStringDescriptor(element,
                                                                        UIFormXmlConstants.ATTRIBUTE_VALUE,
                                                                        UIFormXmlConstants.ATTRIBUTE_RESOURCE_BUNDLE,
                                                                        UIFormXmlConstants.ATTRIBUTE_KEY);
    if (descriptor == null) {
      throw new IllegalArgumentException("String descriptor value required");
    }
    return descriptor;
  }
}

View on GitHub (pinned to be881553f2)

Solutions

  1. Add a value attribute (or resource-bundle + key pair) to the property element shown in the stack trace.
  2. Re-open the form in the GUI designer and re-enter the property value so it serializes correctly.
  3. Remove the malformed property element if the value is not needed.

Example fix

<!-- before -->
<intro-string-property name="text"/>

<!-- after -->
<intro-string-property name="text" value="My Label"/>
Defensive patterns

Strategy: validation

Validate before calling

// When writing intro-string properties, always emit a value or bundle+key
if (value == null && (bundle == null || key == null)) throw new IllegalStateException("intro-string-property needs value or bundle+key");

Try / catch

try { property.read(element); } catch (IllegalArgumentException e) { if ("String descriptor value required".equals(e.getMessage())) { /* add value attribute to the property element */ } else throw e; }

Prevention

When it happens

Trigger: An XML element for an introspected string property carries neither a 'value' attribute nor a resolvable bundle+key pair, so getStringDescriptor returns null. E.g. <intro-string-property name="text"/> with all attributes omitted.

Common situations: Hand-edited or tool-generated form XML where property elements were stripped of their value attributes; properties serialized in a newer format (stored as <property> elements with different attribute names) being read by an older reader.

Related errors


AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14). Data as JSON: /api/errors/9882799366927d5e. Report an issue: GitHub.