I am getting this error when I am updating java version from 11 to 17.
SpecInternals.SpyImpl:168->SpecInternals.createMockImpl:295->SpecInternals.createMockImpl:305-
>SpecInternals.createMock:50 » NoClassDefFound Could not initialize class
org.spockframework.mock.runtime.CglibMockFactory$ConstructorFriendlyEnhancer
I updated to following versions:
But I am still facing the issue. Please let me know if anyone has come across this error while migrating from java 11 to 17.
I had the same problem; I replaced cglib-nodep
by byte-buddy
, then the error disappeared.