Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-17255

Upgrade jacoco to support JDK 1.8

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 4.2.0.Beta2
    • 4.2.0.Beta1
    • build
    • None

      Recently we started attempting to run our integration tests with JDK 1.8, but the build will fail on jacoco:

      [INFO] Command line:
      	cmd.exe /X /C "C:\env\java\oracle1.8\jre\bin\java.exe -Dosgi.noShutdown=false -Dosgi.os=win32 -Dosgi.ws=win32 -Dosgi.arch=x86_64 -javaagent:C:\\Users\\jbossqa\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.6.4.201312101107\\org.jacoco.agent-0.6.4.201312101107-runtime.jar=destfile=C:\\hudson\\workspace\\jbosstools-trunk.matrix.dummy.bot.tests\\5c80b81c\\target\\jacoco.exec,append=true,includes=org.jboss.tools.* -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Dusage_reporting_enabled=false -Dorg.jboss.tools.tests.skipPrivateRequirements=true -Dorg.eclipse.ui.testsDisableWorkbenchAutoSave=true -Dosgi.clean=true -jar C:\Users\jbossqa\.m2\repository\p2\osgi\bundle\org.eclipse.equinox.launcher\1.3.0.v20140224-1459\org.eclipse.equinox.launcher-1.3.0.v20140224-1459.jar -data C:\hudson\workspace\jbosstools-trunk.matrix.dummy.bot.tests\5c80b81c\tests\org.jboss.tools.dummy.ui.bot.test\target\work\data -install C:\hudson\workspace\jbosstools-trunk.matrix.dummy.bot.tests\5c80b81c\tests\org.jboss.tools.dummy.ui.bot.test\target\work -configuration C:\hudson\workspace\jbosstools-trunk.matrix.dummy.bot.tests\5c80b81c\tests\org.jboss.tools.dummy.ui.bot.test\target\work\configuration -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties C:\hudson\workspace\jbosstools-trunk.matrix.dummy.bot.tests\5c80b81c\tests\org.jboss.tools.dummy.ui.bot.test\target\surefire.properties -nouithread"
      java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
      	at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
      Caused by: java.lang.RuntimeException: Class java/util/UUID could not be instrumented.
      	at org.jacoco.agent.rt.internal_6effb9e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
      	at org.jacoco.agent.rt.internal_6effb9e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:99)
      	at org.jacoco.agent.rt.internal_6effb9e.PreMain.createRuntime(PreMain.java:55)
      	at org.jacoco.agent.rt.internal_6effb9e.PreMain.premain(PreMain.java:47)
      	... 6 more
      Caused by: java.lang.NoSuchFieldException: $jacocoAccess
      	at java.lang.Class.getField(Class.java:1690)
      	at org.jacoco.agent.rt.internal_6effb9e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:136)
      	... 9 more
      FATAL ERROR in native method: processing of -javaagent failed
      Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
      Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
      Exception in thread "main" 
      

      It happens on all platforms.
      In the parent pom, I can see we use version 0.6.4.201312101107.
      I found this jacoco issue was dealing with this:
      https://github.com/jacoco/jacoco/issues/74
      The current latest version is 0.7.1.201405082137:
      https://oss.sonatype.org/content/repositories/releases/org/jacoco/jacoco/0.7.1.201405082137/
      Perhaps we could switch to that?

            exd-mmalina Martin Malina
            exd-mmalina Martin Malina
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: