theonedev/onedev · error · ExplicitException
No link spec found:
Error message
No link spec found:
What it means
Thrown during YouTrack issue import when an IssueLinkMapping references a OneDev link spec (issue link type, e.g. 'depends on') that does not exist — OneDev.getInstance(LinkSpecService.class).find() returned null. The importer requires every YouTrack link type to be mapped to a defined OneDev link spec.
Source
Thrown at server-plugin/server-plugin-import-youtrack/src/main/java/io/onedev/server/plugin/imports/youtrack/ImportServer.java:344
oneDevFieldValue = null;
}
FieldSpec fieldSpec = getIssueSetting().getFieldSpec(oneDevFieldName);
if (fieldSpec == null)
throw new ExplicitException("No field spec found: " + oneDevFieldName);
fieldMappings.put(mapping.getYouTrackIssueField(), new Pair<>(fieldSpec, oneDevFieldValue));
}
for (IssueTagMapping mapping : option.getIssueTagMappings()) {
String oneDevFieldName = StringUtils.substringBefore(mapping.getOneDevIssueField(), "::");
String oneDevFieldValue = StringUtils.substringAfter(mapping.getOneDevIssueField(), "::");
FieldSpec fieldSpec = getIssueSetting().getFieldSpec(oneDevFieldName);
if (fieldSpec == null)
throw new ExplicitException("No field spec found: " + oneDevFieldName);
tagMappings.put(mapping.getYouTrackIssueTag(), new Pair<>(fieldSpec, oneDevFieldValue));
}
for (IssueLinkMapping mapping : option.getIssueLinkMappings()) {
LinkSpec linkSpec = OneDev.getInstance(LinkSpecService.class).find(mapping.getOneDevIssueLink());
if (linkSpec == null)
throw new ExplicitException("No link spec found: " + mapping.getOneDevIssueLink());
linkMappings.put(mapping.getYouTrackIssueLink(), linkSpec);
}
Set<String> nonExistentLogins = new LinkedHashSet<>();
Set<String> unmappedIssueTags = new LinkedHashSet<>();
Set<String> unmappedIssueFields = new LinkedHashSet<>();
Set<String> unmappedIssueLinks = new LinkedHashSet<>();
Set<String> unmappedIssueStates = new LinkedHashSet<>();
Map<String, String> mismatchedIssueFields = new LinkedHashMap<>();
Set<String> tooLargeAttachments = new LinkedHashSet<>();
AtomicInteger numOfImportedIssues = new AtomicInteger(0);
List<Issue> issues = new ArrayList<>();
Map<String, Pair<LinkSpec, List<String>>> linkedIssuesMapping = new HashMap<>();
String fields = ""
+ "idReadable,"View on GitHub (pinned to d44925c47c)
Solutions
- Recreate the missing link spec in OneDev administration (Issue Links).
- Re-generate the import option to refresh link mappings against current link specs.
- Edit the mapping to use an existing link spec name exactly.
- Remove link mappings for types you do not need.
Example fix
// before
issueLinkMappings: [{youTrackIssueLink: "depends", oneDevIssueLink: "Depends on"}] // link spec deleted
// after
issueLinkMappings: [{youTrackIssueLink: "depends", oneDevIssueLink: "dependent on"}] Defensive patterns
Strategy: validation
Validate before calling
for (IssueLinkMapping m : option.getIssueLinkMappings()) {
if (OneDev.getInstance(LinkSpecService.class).find(m.getOneDevIssueLink()) == null)
throw new IllegalStateException("Missing link spec: " + m.getOneDevIssueLink());
} Try / catch
try { importServer.importIssues(...); } catch (ExplicitException e) { logger.error("Link mapping invalid: {}", e.getMessage()); } Prevention
- Confirm required link specs exist in OneDev admin before importing.
- Match link spec names exactly (they are user-defined strings).
- Regenerate import options after link spec renames.
When it happens
Trigger: issueLinkMappings contains oneDevIssueLink values like "Depends on" or "Relates to" that were deleted/renamed in OneDev's link spec administration, or the settings were copied from an instance with different link specs.
Common situations: Admin removed or renamed link types in OneDev global settings; migrating import settings between OneDev instances; typo in link name (link spec names are exact).
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Unable to find YouTrack project:
- No field spec found:
- Unable to find project:
- No field spec found:
- Unexpected attachment url:
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/8525dd3409559c01.
Report an issue: GitHub.