JetBrains/intellij-community · error · ConfigurationException

No external project config file is defined

Error message

No external project config file is defined

What it means

Thrown by AbstractImportFromExternalSystemControl.validate() when the linked external project path field is empty. The control validates the path ( StringUtil.isEmpty(linkedProjectPath) ) before it can check registration or delegate to name/path validation; an empty path means no external project is defined to import or link.

Source

Thrown at java/idea-ui/src/com/intellij/openapi/externalSystem/service/settings/AbstractImportFromExternalSystemControl.java:248

    myProjectSettingsControl.apply(myProjectSettings);
    if (mySystemSettingsControl != null) {
      mySystemSettingsControl.apply(mySystemSettings);
    }
  }

  public @Nullable ProjectFormatPanel getProjectFormatPanel() {
    return myShowProjectFormatPanel ? myProjectFormatPanel : null;
  }

  public boolean validate(WizardContext wizardContext, boolean defaultFormat) throws ConfigurationException {
    if (ApplicationManager.getApplication().isHeadlessEnvironment()) return true;

    if (!myProjectSettingsControl.validate(myProjectSettings)) return false;
    if (mySystemSettingsControl != null && !mySystemSettingsControl.validate(mySystemSettings)) return false;
    String linkedProjectPath = myLinkedProjectPathField.getPath();
    Project currentProject = getProject();
    if (StringUtil.isEmpty(linkedProjectPath)) {
      throw new ConfigurationException(JavaUiBundle.message("error.project.undefined"));
    }
    else if (currentProject != null) {
      ExternalSystemManager<?, ?, ?, ?, ?> manager = ExternalSystemApiUtil.getManager(myExternalSystemId);
      assert manager != null;
      AbstractExternalSystemSettings<?, ?, ?> settings = manager.getSettingsProvider().fun(currentProject);
      if (settings.getLinkedProjectSettings(linkedProjectPath) != null) {
        throw new ConfigurationException(ExternalSystemBundle.message("error.project.already.registered"));
      }
    }

    return !(wizardContext.isCreatingNewProject() && !myLinkedProjectPathField.validateNameAndPath(wizardContext, defaultFormat));
  }
}

View on GitHub (pinned to be881553f2)

Solutions

  1. Fill in the external system project location field (root directory or build file) and retry
  2. Use the folder icon to browse to the project containing the build script
  3. In embedding code, always initialize the linked project path field before invoking validate()
Defensive patterns

Strategy: validation

Validate before calling

if (StringUtil.isEmpty(control.getLinkedProjectPathField().getPath())) {
  // block Next until a path is chosen
}
control.validate(wizardContext, true);

Prevention

When it happens

Trigger: Calling validate(wizardContext, defaultFormat) on the import control while myLinkedProjectPathField.getPath() is empty — the UI field was never filled or was cleared by the user (headless mode returns true early and never hits this).

Common situations: Import Gradle/Maven project dialog advanced with blank project location; plugin embedding the control without calling setPath on the linked-project field; path field cleared after a failed browse action.

Related errors


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