Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NoClassDefFoundError happening when snakeyaml is used on a custom JRE #7598

Merged
merged 3 commits into from
Jan 19, 2023

Conversation

mateuszrzeszutek
Copy link
Member

Fixes #7580

@mateuszrzeszutek mateuszrzeszutek requested a review from a team January 17, 2023 17:37
@@ -417,19 +421,6 @@ void testEmptyTagFromParameter() {
runNegativeTest(yaml);
}

@Test
void testEmptyPrefix() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test case no longer makes any sense with the new parser.

Yaml yaml = new Yaml(new Constructor(JmxConfig.class));
return yaml.load(is);
@SuppressWarnings("unchecked")
public JmxConfig loadConfig(InputStream is) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the whole JMX config parsing module needs some further refactoring -- we could simplify the code, remove mutability, and clearly separate parsing from converting the config to its "executable" form. Not in this PR though, let's not mix concerns.

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PeterF778 if you have a chance, can you review these changes to the jmx-metrics module?

@PeterF778
Copy link
Contributor

The changes look good. Thanks, @mateuszrzeszutek, for rewriting the JMX Metric Insight yaml parser to work with snakeyaml-engine.

@trask trask merged commit 268165c into open-telemetry:main Jan 19, 2023
@mateuszrzeszutek mateuszrzeszutek deleted the fix-no-class-def-found branch January 20, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.lang.NoClassDefFoundError: java/beans/IntrospectionException if java.desktop not included
5 participants