JetBrains/intellij-community · error · ConfigurationException
library.name.is.not.specified
library.name.is.not.specified
Error message
Library name is not specified
What it means
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.
Source
Thrown at java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/BaseLibrariesConfigurable.java:90
}
@Override
public boolean isModified() {
boolean isModified = false;
for (final LibrariesModifiableModel provider : myContext.myLevel2Providers.values()) {
isModified |= provider.isChanged();
}
return isModified || super.isModified();
}
@Override
public void checkCanApply() throws ConfigurationException {
super.checkCanApply();
checkForEmptyAndDuplicatedNames(JavaUiBundle.message("configurable.library.prefix"), CommonBundle.getErrorTitle(), LibraryConfigurable.class);
for (LibraryConfigurable configurable : getLibraryConfigurables()) {
if (configurable.getDisplayName().isEmpty()) {
((LibraryProjectStructureElement)configurable.getProjectStructureElement()).navigate();
throw new ConfigurationException(JavaUiBundle.message("library.name.is.not.specified"));
}
}
}
@Override
public void reset() {
super.reset();
myTree.setRootVisible(false);
}
@Override
protected void loadTree() {
createLibrariesNode(myContext.createModifiableModelProvider(myLevel));
}
@Override
protected @NotNull Collection<? extends ProjectStructureElement> getProjectStructureElements() {
final List<ProjectStructureElement> result = new ArrayList<>();View on GitHub (pinned to be881553f2)
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
Defensive patterns
Strategy: validation
Validate before calling
for (LibraryConfigurable c : getLibraryConfigurables()) {
if (c.getDisplayName().isEmpty()) {
// block apply, focus this library's name field
}
} Try / catch
try { configurable.checkCanApply(); } catch (ConfigurationException e) { /* navigate() already focused the unnamed library */ } Prevention
- Name libraries immediately upon creation
- Use naming conventions like 'lib:guava-33' to keep names unique and non-empty
When it happens
Trigger: Creating a new library in Project Structure > Libraries and pressing OK without typing a name; renaming an existing library to the empty string.
Common situations: 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.
Related errors
- Please specify SDK name
- module.paths.validation.source.root.belongs.to.another.module.error
- Offset out of range (from -12:00 to +14:00)
- Module '{0}' already exist in project. Please, specify anoth
- Enter module file location
AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14).
Data as JSON: /api/errors/375ccf42333fc535.
Report an issue: GitHub.