I have assembled a test project that replicates this issue. It seems like the Byte Buddy enhancer manages to enhance some classes, while for others it throw the following exception:
To replicate the issue, you can simply run:
The problem is the use of Enhancer::enhance(File). The plugin resolves class files by the relative path of the passed instance where it is no longer possible to distinguish between a type foo.bar.Qux and a type bar.Qux residing in a folder foo. The API should not be used but the plugin should resolve the name and byte array itself. When I refactored the plugin to not rely on Javassist types, this boundary broke without a test to capture the problem. A similar problem occurs when using Javassist.
I am preparing a patch for it right now.
Applied PR upstream.