ExpediaGroup / jenkins-spock

Unit-test Jenkins pipeline code with Spock
https://javadoc.io/doc/com.homeaway.devtools.jenkins/jenkins-spock
Apache License 2.0
186 stars 73 forks source link

java.lang.NoClassDefFoundError: org/jvnet/fastinfoset/VocabularyApplicationData #131

Open andham opened 1 year ago

andham commented 1 year ago

Expected Behavior

The test should execute with Java 11.

Actual Behavior

The test run fails with:

java.lang.NoClassDefFoundError: org/jvnet/fastinfoset/VocabularyApplicationData at java.base/java.lang.Class.forName(Class.java:315) at com.homeaway.devtools.jenkins.testing.LocalProjectPipelineExtensionDetector.getClassesOfTypeInPackage(LocalProjectPipelineExtensionDetector.java:88) at com.homeaway.devtools.jenkins.testing.JenkinsPipelineSpecification.setupSpec(JenkinsPipelineSpecification.groovy:1122) Caused by: java.lang.ClassNotFoundException: org.jvnet.fastinfoset.VocabularyApplicationData at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 3 more

Steps to Reproduce

Please include a numbered list of steps that other people can use to recreate the "Actual Behavior."

  1. Create a test case that uses loadPipelineScriptForTest()
  2. Include pipeline-model-definition as a dependency in the pom.
  3. Execute test with Java 11.

Additional Information

It works with Java 8 but fails with Java 11. The problem started when we upgraded pipeline-model-definition in our dependency from 2.2086.v12b_420f036e5 to 2.2097.v33db_b_de764b_e.

corporate-gadfly commented 1 year ago

Probably fixed by #90 (which is unreleased, as of yet).

mrlov commented 1 year ago

I get the same error :-(