{"record":{"id":"375ccf42333fc535","repo":"JetBrains/intellij-community","slug":"library-name-is-not-specified","errorCode":"library.name.is.not.specified","errorMessage":"Library name is not specified","messagePattern":"Library name is not specified","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/BaseLibrariesConfigurable.java","lineNumber":90,"sourceCode":"  }\n\n  @Override\n  public boolean isModified() {\n    boolean isModified = false;\n    for (final LibrariesModifiableModel provider : myContext.myLevel2Providers.values()) {\n      isModified |= provider.isChanged();\n    }\n    return isModified || super.isModified();\n  }\n\n  @Override\n  public void checkCanApply() throws ConfigurationException {\n    super.checkCanApply();\n    checkForEmptyAndDuplicatedNames(JavaUiBundle.message(\"configurable.library.prefix\"), CommonBundle.getErrorTitle(), LibraryConfigurable.class);\n    for (LibraryConfigurable configurable : getLibraryConfigurables()) {\n      if (configurable.getDisplayName().isEmpty()) {\n        ((LibraryProjectStructureElement)configurable.getProjectStructureElement()).navigate();\n        throw new ConfigurationException(JavaUiBundle.message(\"library.name.is.not.specified\"));\n      }\n    }\n  }\n\n  @Override\n  public void reset() {\n    super.reset();\n    myTree.setRootVisible(false);\n  }\n\n  @Override\n  protected void loadTree() {\n    createLibrariesNode(myContext.createModifiableModelProvider(myLevel));\n  }\n\n  @Override\n  protected @NotNull Collection<? extends ProjectStructureElement> getProjectStructureElements() {\n    final List<ProjectStructureElement> result = new ArrayList<>();","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/BaseLibrariesConfigurable.java#L72-L108","documentation":"Thrown from BaseLibrariesConfigurable.checkCanApply() when a library entry in Project Structure > Libraries has an empty display name. Every project-level library needs a unique non-empty name so it can be referenced from module dependencies and stored in .idea/libraries. Before this message, a generic empty/duplicate-name check runs; this specific error fires per-configurable for an unnamed library.","triggerScenarios":"Creating a new library in Project Structure > Libraries and pressing OK without typing a name; renaming an existing library to the empty string.","commonSituations":"Users adding a library from JARs quickly and forgetting the name field; copy-paste of library definitions clearing names; UI focus issues where the typed name is lost.","solutions":["Select the unnamed library entry (the dialog navigates to it automatically via navigate()) and type a name","Use a name unique among all libraries in the project to also pass the duplicate-name check that runs before this one"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"for (LibraryConfigurable c : getLibraryConfigurables()) {\n  if (c.getDisplayName().isEmpty()) {\n    // block apply, focus this library's name field\n  }\n}","typeGuard":null,"tryCatchPattern":"try { configurable.checkCanApply(); } catch (ConfigurationException e) { /* navigate() already focused the unnamed library */ }","preventionTips":["Name libraries immediately upon creation","Use naming conventions like 'lib:guava-33' to keep names unique and non-empty"],"tags":["intellij","libraries","project-structure","validation"],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}