Skip to content

Make the objenesis import mandatory in proxy-impl - #913

Open
holgerfriedrich wants to merge 1 commit into
apache:trunkfrom
holgerfriedrich:pr-obj-mandatory
Open

holgerfriedrich wants to merge 1 commit into
apache:trunkfrom
holgerfriedrich:pr-obj-mandatory

Conversation

@holgerfriedrich

@holgerfriedrich holgerfriedrich commented Sep 19, 2026

Copy link
Copy Markdown

Since #414 ProxySubclassGenerator references org.objenesis directly, so the class cannot be loaded without it. AsmProxyManager.isProxyClass() loads that class for every proxy, including interface-only ones, so with the import declared optional a bundle resolves and then fails with NoClassDefFoundError: org/objenesis/Objenesis on the first proxy.

If you want to keep it strictly optional, then we would need to restructure and use Objenesis only for those cases where it is required.

Discovered when I had to add a new dep to the feature in apache/karaf#2214 to fix tests - though feature resolution was fine before.

@github-actions github-actions Bot added the proxy label Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant