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

Remove MBean-related reflection entries from undertow-core #161

Merged

Conversation

wilkinsona
Copy link
Contributor

What does this PR do?

Similar to the problem with Hibernate that #113 fixed, Undertow's metadata contains entries for various MBean-related classes. This metadata causes a call to
ManagementFactory.getPlatformMBeanServer() to fail with a javax.management.openmbean.OpenDataException. It would appear that the metadata is sufficient for the bootstrapping of the MBean server to take a different code path to normal and this path fails. This PR removes the offending metadata which fixes ManagementFactory.getPlatformMBeanServer() and has no adverse effects on the existing tests for hibernate-core.

Checklist before merging

  • I have properly formatted metadata files (see CONTRIBUTING document)
  • I have added thorough tests. (see this)

No new tests have been added but the existing tests are unaffected by the changes.

@wilkinsona
Copy link
Contributor Author

I'm not sure why CI failed. ./gradlew test -Pcoordinates=io.undertow:undertow-core:2.2.19.Final succeeded locally.

Copy link
Member

@vjovanov vjovanov left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM.

@vjovanov
Copy link
Member

@melix any idea why this build fails?

@dnestoro
Copy link
Member

@wilkinsona please try to rebase your PR and restart CI. This error should be fixed

undertow-core's metadata contains entries for various MBean-related
classes. This metadata causes a call to
ManagementFactory.getPlatformMBeanServer() to fail with a
javax.management.openmbean.OpenDataException. It would appear that
the metadata is sufficient for the bootstrapping of the MBean server
to take a different code path to normal and this path fails. Removing
the metadata fixes ManagementFactory.getPlatformMBeanServer() and
has no adverse effects on the existing tests for undertow-core.
@wilkinsona wilkinsona force-pushed the fix-undertow-mbean-server-problem branch from b8a2e70 to a0f54de Compare January 18, 2023 09:57
@dnestoro dnestoro merged commit 87a5d52 into oracle:master Jan 18, 2023
@wilkinsona wilkinsona deleted the fix-undertow-mbean-server-problem branch January 18, 2023 11:16
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.

3 participants