|
According to the documentation for the javassist.ClassPool#getClassLoader() method:
And for javassist.ClassPool#toClass()
In this particluar issue, the @ManyToOne annotation that comes out of the ClassPool is in the class loader for the current thread (from the maven plugin) while the target entity is in the loading classloader. We want to use the loading classloader everywhere, so we need to subclass the ClassPool.
Thanks for the reproducer. It was really helpful.
|