{"record":{"id":"5579d6f480c66033","repo":"JetBrains/intellij-community","slug":"no-external-project-config-file-is-defined-5579d6","errorCode":null,"errorMessage":"No external project config file is defined","messagePattern":"No external project config file is defined","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"java/idea-ui/src/com/intellij/openapi/externalSystem/service/settings/AbstractImportFromExternalSystemControl.java","lineNumber":248,"sourceCode":"    myProjectSettingsControl.apply(myProjectSettings);\n    if (mySystemSettingsControl != null) {\n      mySystemSettingsControl.apply(mySystemSettings);\n    }\n  }\n\n  public @Nullable ProjectFormatPanel getProjectFormatPanel() {\n    return myShowProjectFormatPanel ? myProjectFormatPanel : null;\n  }\n\n  public boolean validate(WizardContext wizardContext, boolean defaultFormat) throws ConfigurationException {\n    if (ApplicationManager.getApplication().isHeadlessEnvironment()) return true;\n\n    if (!myProjectSettingsControl.validate(myProjectSettings)) return false;\n    if (mySystemSettingsControl != null && !mySystemSettingsControl.validate(mySystemSettings)) return false;\n    String linkedProjectPath = myLinkedProjectPathField.getPath();\n    Project currentProject = getProject();\n    if (StringUtil.isEmpty(linkedProjectPath)) {\n      throw new ConfigurationException(JavaUiBundle.message(\"error.project.undefined\"));\n    }\n    else if (currentProject != null) {\n      ExternalSystemManager<?, ?, ?, ?, ?> manager = ExternalSystemApiUtil.getManager(myExternalSystemId);\n      assert manager != null;\n      AbstractExternalSystemSettings<?, ?, ?> settings = manager.getSettingsProvider().fun(currentProject);\n      if (settings.getLinkedProjectSettings(linkedProjectPath) != null) {\n        throw new ConfigurationException(ExternalSystemBundle.message(\"error.project.already.registered\"));\n      }\n    }\n\n    return !(wizardContext.isCreatingNewProject() && !myLinkedProjectPathField.validateNameAndPath(wizardContext, defaultFormat));\n  }\n}\n","sourceCodeStart":230,"sourceCodeEnd":262,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/idea-ui/src/com/intellij/openapi/externalSystem/service/settings/AbstractImportFromExternalSystemControl.java#L230-L262","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Fill in the external system project location field (root directory or build file) and retry","Use the folder icon to browse to the project containing the build script","In embedding code, always initialize the linked project path field before invoking validate()"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (StringUtil.isEmpty(control.getLinkedProjectPathField().getPath())) {\n  // block Next until a path is chosen\n}\ncontrol.validate(wizardContext, true);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pre-fill the linked project path from the previously selected file/directory","Disable validation-triggering Finish while the path field is blank"],"tags":["external-system","import","validation","intellij"],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}