I am using Java 17 and Spring Boot Starter 3.2.2.
I tried to use Javassist 3.22.0-GA so that I can create dynamic classes.
A simple code was tested where ctClass was created , a single field of type string is added to the ctClass and a default constructor is added.
But ctClass.toClass() always throws java.lang.NullPointerException cannot invoke java.lang.reflect.field.setaccessible(boolean) because ao is null. Does it have to do with Javassist version? Can someone please help how to solve this issue and create a simple class dynamically using Javassist ?