When we upgraded our application to jdk-8 , I was getting the below error during my gradle test task.
initializationError java.lang.IllegalStateException: Failed to transform class with name Processor.java. Reason: java.io.IOException: invalid constant type: 18
The issue was one of my class was using javasssit library which is not compatible with java-8. So we have upgraded javassist to the latest version.
compile(group: ‘org.javassist’, name: ‘javassist’, version: ‘3.20.0-GA’)