Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

junit5spring provider - Cannot inherit from final class #1338

Open
chris-faulkner-mojdt opened this issue Apr 9, 2021 · 3 comments
Open

Comments

@chris-faulkner-mojdt
Copy link

Had the issue below with

testImplementation("au.com.dius.pact.provider:junit5spring:4.2.3")

Reverting to 4.2.2 resolved it. It's fatal, obviously.


Cannot inherit from final class
java.lang.VerifyError: Cannot inherit from final class
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	at au.com.dius.pact.provider.spring.junit5.PactVerificationSpringProvider$provideTestTemplateInvocationContexts$1.apply(PactVerificationSpringProvider.kt:26)
	at au.com.dius.pact.provider.spring.junit5.PactVerificationSpringProvider$provideTestTemplateInvocationContexts$1.apply(PactVerificationSpringProvider.kt:12)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
@uglyog
Copy link
Member

uglyog commented Apr 11, 2021

4.2.4 has been released

@chris-faulkner-mojdt
Copy link
Author

4.2.4 has been released

I have tried with 4.2.4 and I still get the same. Is this comment just automatically added ?

@uglyog
Copy link
Member

uglyog commented Apr 15, 2021

No, the comment was manually added by me.

Are you getting the same error? I made the class open, see https://github.com/pact-foundation/pact-jvm/blob/master/provider/junit5spring/src/main/kotlin/au/com/dius/pact/provider/spring/junit5/PactVerificationSpringProvider.kt but if that was not the problem then it is not clear from the stack trace you provided what is.

Are you able to provide some code or debug level logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants