Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-1170

JDK9 with drools: Build: switch back to maven-jaxb2-plugin (but it throws ClassNotFoundException: com.sun.codemodel.CodeWriter)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 7.17.0.Final
    • None
    • build
    • NEW
    • NEW

      See
      https://kie-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/kie-all-build-master-jdk9/

      13:47:25 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:2.2:xjc (default) on project drools-pmml: Execution default of goal org.codehaus.mojo:jaxb2-maven-plugin:2.2:xjc failed: A required class was missing while executing org.codehaus.mojo:jaxb2-maven-plugin:2.2:xjc: com/sun/codemodel/CodeWriter
      13:47:25 -----------------------------------------------------
      13:47:25 realm =    plugin>org.codehaus.mojo:jaxb2-maven-plugin:2.2
      13:47:25 strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      13:47:25 urls[0] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/mojo/jaxb2-maven-plugin/2.2/jaxb2-maven-plugin-2.2.jar
      13:47:25 urls[1] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/javax/xml/bind/jaxb-api/2.2.11/jaxb-api-2.2.11.jar
      13:47:25 urls[2] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-core/2.2.11/jaxb-core-2.2.11.jar
      13:47:25 urls[3] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-runtime/2.2.11/jaxb-runtime-2.2.11.jar
      13:47:25 urls[4] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-xjc/2.2.11/jaxb-xjc-2.2.11.jar
      13:47:25 urls[5] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-jxc/2.2.11/jaxb-jxc-2.2.11.jar
      13:47:25 urls[6] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/com/thoughtworks/qdox/qdox/2.0-M3/qdox-2.0-M3.jar
      13:47:25 urls[7] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
      13:47:25 urls[8] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
      13:47:25 urls[9] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
      13:47:25 urls[10] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
      13:47:25 urls[11] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
      13:47:25 urls[12] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
      13:47:25 urls[13] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
      13:47:25 urls[14] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-compiler-api/2.5/plexus-compiler-api-2.5.jar
      13:47:25 urls[15] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
      13:47:25 urls[16] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
      13:47:25 Number of foreign imports: 1
      13:47:25 import: Entry[import  from realm ClassRealm[project>org.drools:drools:7.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
      13:47:25 
      13:47:25 -----------------------------------------------------
      13:47:25 
      13:47:25 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
      13:47:25 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      13:47:25 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      13:47:25 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      13:47:25 	at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:188)
      13:47:25 	at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:184)
      13:47:25 	at java.util.concurrent.FutureTask.run(java.base@9-ea/FutureTask.java:266)
      13:47:25 	at java.util.concurrent.Executors$RunnableAdapter.call(java.base@9-ea/Executors.java:514)
      13:47:25 	at java.util.concurrent.FutureTask.run(java.base@9-ea/FutureTask.java:266)
      13:47:25 	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@9-ea/ThreadPoolExecutor.java:1158)
      13:47:25 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@9-ea/ThreadPoolExecutor.java:632)
      13:47:25 	at java.lang.Thread.run(java.base@9-ea/Thread.java:804)
      13:47:25 Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.codehaus.mojo:jaxb2-maven-plugin:2.2:xjc failed: A required class was missing while executing org.codehaus.mojo:jaxb2-maven-plugin:2.2:xjc: com/sun/codemodel/CodeWriter
      13:47:25 -----------------------------------------------------
      13:47:25 realm =    plugin>org.codehaus.mojo:jaxb2-maven-plugin:2.2
      13:47:25 strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      13:47:25 urls[0] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/mojo/jaxb2-maven-plugin/2.2/jaxb2-maven-plugin-2.2.jar
      13:47:25 urls[1] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/javax/xml/bind/jaxb-api/2.2.11/jaxb-api-2.2.11.jar
      13:47:25 urls[2] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-core/2.2.11/jaxb-core-2.2.11.jar
      13:47:25 urls[3] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-runtime/2.2.11/jaxb-runtime-2.2.11.jar
      13:47:25 urls[4] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-xjc/2.2.11/jaxb-xjc-2.2.11.jar
      13:47:25 urls[5] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-jxc/2.2.11/jaxb-jxc-2.2.11.jar
      13:47:25 urls[6] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/com/thoughtworks/qdox/qdox/2.0-M3/qdox-2.0-M3.jar
      13:47:25 urls[7] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
      13:47:25 urls[8] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
      13:47:25 urls[9] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
      13:47:25 urls[10] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
      13:47:25 urls[11] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
      13:47:25 urls[12] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
      13:47:25 urls[13] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
      13:47:25 urls[14] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-compiler-api/2.5/plexus-compiler-api-2.5.jar
      13:47:25 urls[15] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
      13:47:25 urls[16] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
      13:47:25 Number of foreign imports: 1
      13:47:25 import: Entry[import  from realm ClassRealm[project>org.drools:drools:7.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
      13:47:25 
      13:47:25 -----------------------------------------------------
      13:47:25 
      13:47:25 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:166)
      13:47:25 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      13:47:25 	... 11 more
      13:47:25 Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing org.codehaus.mojo:jaxb2-maven-plugin:2.2:xjc: com/sun/codemodel/CodeWriter
      13:47:25 -----------------------------------------------------
      13:47:25 realm =    plugin>org.codehaus.mojo:jaxb2-maven-plugin:2.2
      13:47:25 strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      13:47:25 urls[0] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/mojo/jaxb2-maven-plugin/2.2/jaxb2-maven-plugin-2.2.jar
      13:47:25 urls[1] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/javax/xml/bind/jaxb-api/2.2.11/jaxb-api-2.2.11.jar
      13:47:25 urls[2] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-core/2.2.11/jaxb-core-2.2.11.jar
      13:47:25 urls[3] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-runtime/2.2.11/jaxb-runtime-2.2.11.jar
      13:47:25 urls[4] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-xjc/2.2.11/jaxb-xjc-2.2.11.jar
      13:47:25 urls[5] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/glassfish/jaxb/jaxb-jxc/2.2.11/jaxb-jxc-2.2.11.jar
      13:47:25 urls[6] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/com/thoughtworks/qdox/qdox/2.0-M3/qdox-2.0-M3.jar
      13:47:25 urls[7] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
      13:47:25 urls[8] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
      13:47:25 urls[9] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
      13:47:25 urls[10] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
      13:47:25 urls[11] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
      13:47:25 urls[12] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
      13:47:25 urls[13] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
      13:47:25 urls[14] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-compiler-api/2.5/plexus-compiler-api-2.5.jar
      13:47:25 urls[15] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
      13:47:25 urls[16] = file:/home/jenkins/workspace/kie-all-build-master-jdk9/.repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
      13:47:25 Number of foreign imports: 1
      13:47:25 import: Entry[import  from realm ClassRealm[project>org.drools:drools:7.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
      13:47:25 
      13:47:25 -----------------------------------------------------
      13:47:25 
      13:47:25 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:164)
      13:47:25 	... 12 more
      13:47:25 Caused by: java.lang.NoClassDefFoundError: com/sun/codemodel/CodeWriter
      13:47:25 	at org.codehaus.mojo.jaxb2.javageneration.AbstractJavaGeneratorMojo.performExecution(AbstractJavaGeneratorMojo.java:402)
      13:47:25 	at org.codehaus.mojo.jaxb2.AbstractJaxbMojo.execute(AbstractJaxbMojo.java:257)
      13:47:25 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      13:47:25 	... 12 more
      13:47:25 Caused by: java.lang.ClassNotFoundException: com.sun.codemodel.CodeWriter
      13:47:25 	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      13:47:25 	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
      13:47:25 	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
      13:47:25 	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
      13:47:25 	... 15 more
      

      Looks like we need a newer version of the maven-jaxb2-plugin.

              mfusco@redhat.com Mario Fusco
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: