I am trying to dynamically create a new class in Spark using javaassist API. 
The code seems very simple just invoking makeClass API on a hardcoded class 
name. The code works find outside Spark environment but getting this 
chedkNotFrozen exception when I am running the code inside Spark
Code Excerpt:
ClassPool pool = ClassPool.getDefault()
CtClass regExClass= pool.makeClass("TestClass14",baseFeatureProcessor)
Exception Details:
###################### Exception make Class
java.lang.RuntimeException: TestClass14: frozen class (cannot edit)
    at javassist.ClassPool.checkNotFrozen(ClassPool.java:617)
    at javassist.ClassPool.makeClass(ClassPool.java:859)

Reply via email to