pinpoint-apm/pinpoint · error · IllegalStateException
Error parsing yml :
Error message
Error parsing yml :
What it means
parse0(URL) deserializes the type-provider YAML with Jackson. If Jackson raises JsonParseException or JsonMappingException — the document is not valid YAML/JSON or does not map to ParsedTraceMetadata — it is wrapped in an IllegalStateException('Error parsing yml : ' + metaUrl).
Source
Thrown at agent-module/plugins-loader/src/main/java/com/navercorp/pinpoint/loader/plugins/trace/yaml/TraceMetadataProviderYamlParser.java:73
List<AnnotationKey> annotationKeys = toAnnotationKeys(parsedTraceMetadata.getAnnotationKeys());
return new ParsedTraceMetadataProvider(typeProviderId, serviceTypeInfos, annotationKeys);
} catch (Exception e) {
throw new IllegalStateException("Invalid type provider definition : " + url.toString(), e);
}
} catch (IOException e) {
throw new IllegalStateException("IOException parsing " + url.toExternalForm(), e);
}
}
private ParsedTraceMetadata parse0(URL metaUrl) throws IOException {
try (InputStream inputStream = metaUrl.openStream()) {
ParsedTraceMetadata parsedTraceMetadata = mapper.readValue(inputStream, ParsedTraceMetadata.class);
if (parsedTraceMetadata == null) {
logger.warn("Empty type provider definition. Skipping : {}", metaUrl.toExternalForm());
}
return parsedTraceMetadata;
} catch (JsonParseException | JsonMappingException e) {
throw new IllegalStateException("Error parsing yml : " + metaUrl, e);
} catch (IOException e) {
throw new IllegalStateException("Error opening stream : " + metaUrl, e);
}
}
private String getTypeProviderId(URL metaUrl) {
try {
URLConnection urlConnection = metaUrl.openConnection();
if (urlConnection instanceof JarURLConnection) {
JarURLConnection jarUrlConnection = (JarURLConnection) urlConnection;
String jarFileName = new File(jarUrlConnection.getJarFile().getName()).getName();
String entryFileName = new File(jarUrlConnection.getEntryName()).getName();
return jarFileName + ":" + entryFileName;
}
} catch (IOException e) {
logger.warn("Error opening : " + metaUrl, e);
return metaUrl.toExternalForm();
}View on GitHub (pinned to 744c3d3075)
Solutions
- Validate the YAML with a linter/parser (e.g. yamllint or python -c 'import yaml; yaml.safe_load(open(...))')
- Replace tabs with spaces and fix indentation
- Check field types in the yml against the ParsedTraceMetadata class
- Read the wrapped Jackson exception for the exact line/problem
Example fix
// before (tab indentation — invalid YAML)
serviceTypes:
- code: 1000
// after (spaces)
serviceTypes:
- code: 1000
name: "MY_SERVICE" Defensive patterns
Strategy: try-catch
Validate before calling
new org.yaml.snakeyaml.Yaml().load(new FileInputStream(path)); // fail fast on malformed YAML before handing to the plugin parser
Try / catch
try {
parser.parse(url);
} catch (IllegalStateException e) {
if (e.getCause() instanceof JsonParseException || e.getCause() instanceof JsonMappingException) {
// fix YAML syntax/structure at the location Jackson reports
}
} Prevention
- Run yamllint on provider files
- Use spaces, never tabs, for YAML indentation
- Validate field types against ParsedTraceMetadata in tests
When it happens
Trigger: The resource at metaUrl contains malformed YAML (bad indentation, tabs, stray characters) or valid YAML whose structure doesn't match ParsedTraceMetadata (wrong types for fields).
Common situations: Hand-edited yml with tab indentation; duplicated keys; a field typed as int receiving a string; editor auto-formatting changing the structure.
Related errors
- annotationKey name must not be empty
- matcher type must not be empty
- Unknown matcher type :
- service type name must not be empty
- Invalid type provider definition :
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/5aca7b95d4c90e91.
Report an issue: GitHub.