Scala Programming Language
  1. Scala Programming Language
  2. SI-7112

reflection-java-annotations fails on java7

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.10.1
    • Component/s: None

      Description

      Please, no more tests which fail on java7. I don't know what the obstacle is to testing with java7, but things need to work regardless.

      % test/partest test/files/run/reflection-java-annotations
      
      Testing individual files
      java.lang.IllegalAccessError: tried to access class JavaSimpleEnumeration_1 from class sun.proxy.$Proxy6
      	at sun.proxy.$Proxy6.v112(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaAnnotationProxy$$anonfun$assocs$2.apply(JavaMirrors.scala:181)
      	at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaAnnotationProxy$$anonfun$assocs$2.apply(JavaMirrors.scala:180)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      	at scala.collection.immutable.List.foreach(List.scala:300)
      

        Activity

        Hide
        Eugene Burmako added a comment -

        Will fix. Adriaan, is it possible to have kitty also test java 7?

        Show
        Eugene Burmako added a comment - Will fix. Adriaan, is it possible to have kitty also test java 7?
        Show
        Lukas Rytz added a comment - https://scala-webapps.epfl.ch/jenkins/job/scala-nightly-auxjvm/1655/jdk=jdk7,label=auxjvm/consoleFull seems not to have problems
        Hide
        Paul Phillips added a comment -

        Is the 2.10.x branch also tested under java7? I think this failure involves javac-artifacts.jar, which has been removed in 2.10.x but is still present in master:

        Resolving [61931a51bb1a2d308d214b96d06e9a8808515dcf/test/files/lib/javac-artifacts.jar]

        Show
        Paul Phillips added a comment - Is the 2.10.x branch also tested under java7? I think this failure involves javac-artifacts.jar, which has been removed in 2.10.x but is still present in master: Resolving [61931a51bb1a2d308d214b96d06e9a8808515dcf/test/files/lib/javac-artifacts.jar]
        Hide
        Eugene Burmako added a comment -

        Paul, are you still able to reproduce the issue? I no longer am:

        14:03 ~/Projects/Kepler_7112 (ticket/7112)$ t files/run/reflection-java-annotations 
        Buildfile: /Users/xeno_by/Projects/Kepler_7112/build.xml
        
        init.jars.check:
        
        init.jars:
             [echo] Updating bootstrap libs.  (To do this by hand, run ./pull-binary-libs.sh)
             [exec] Resolving [943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar]
             [exec] Resolving [3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar]
             [exec] Resolving [7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar]
             [exec] Resolving [7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar]
             [exec] Resolving [2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar]
             [exec] Resolving [f93a2525b5616d3a4bee7848fabbb2856b56f653/lib/forkjoin.jar]
             [exec] Resolving [a5261e70728c1847639e2b47d953441d0b217bcb/lib/jline.jar]
             [exec] Resolving [f9f41fb909df6a0178906c9fd02e5d0efa15c9ed/lib/scala-compiler-src.jar]
             [exec] Resolving [c4cd524dc29d298a5034637f6b31122dccb300d6/lib/scala-compiler.jar]
             [exec] Resolving [2cba5a13ef44bf93133be26cc89ba3a640a5c28f/lib/scala-library-src.jar]
             [exec] Resolving [d7c6e69eba3dba2f75a0f44e56480cd3dbab8931/lib/scala-library.jar]
             [exec] Resolving [dbc00bd4b09012aa52e802926dee3f8a02a767ff/lib/scala-reflect-src.jar]
             [exec] Resolving [c0eed5dee0a3204239c9b35134cad8b3ad140121/lib/scala-reflect.jar]
             [exec] Resolving [e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar]
             [exec] Resolving [02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar]
             [exec] Resolving [981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar]
             [exec] Resolving [b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar]
             [exec] Resolving [346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar]
             [exec] Resolving [be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar]
             [exec] Resolving [cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar]
             [exec] Resolving [b6f4dbb29f0c2ec1eba682414f60d52fea84f703/test/files/lib/scalacheck.jar]
             [exec] Resolving [1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar]
             [exec] Resolving [a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar]
        
        init.maven.tasks:
        
        init.maven.jars:
        [artifact:dependencies] There were no dependencies specified
        
        init.hasbuildnum:
        
        init.build.snapshot:
        
        init.build.release:
        
        init.build.nopatch.release:
        
        init.build.patch.release:
        
        init.hasmavensuffix:
        
        init.osgi.suffix:
        
        init.osgi.suffix.final:
        
        init.osgi.suffix.snapshot:
        
        init.build.suffix.done:
        
        init.version.git:
        
        init.version.release:
        
        init.version.snapshot:
        
        init.version.done:
        
        init.testjava6:
        
        init.fail.bad.jdk:
        
        init.warn.jdk7:
             [echo]  You are using JDK7 for this build.  While this will be able to build most of Scala, it will
             [echo]        not build the Swing project.   You will be unable to create a distribution.
             [echo]      
        
        init.extra.tasks:
        [artifact:dependencies] [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:compile' is invalid.
        [artifact:dependencies] 
        [artifact:dependencies] Its dependencies (if any) will NOT be available to the current build.
        
        init:
            [mkdir] Created dir: /Users/xeno_by/Projects/Kepler_7112/lib/extra
             [echo]        build time: 15 February 2013, 14:04:02
             [echo]      java version: Java HotSpot(TM) 64-Bit Server VM 1.7.0_12-ea (1.7)
             [echo]         java args: -Xms1536M -Xmx3072M -Xss2M -XX:MaxPermSize=512M -XX:+UseParallelGC 
             [echo]        javac args: 
             [echo]       scalac args: -Yreify-copypaste  
             [echo] scalac quick args: -Yreify-copypaste   
             [echo]          git date: 20130212-222356
             [echo]          git hash: bafebe1c16
             [echo]     maven version: 2.11.0-SNAPSHOT
             [echo]      OSGi version: 2.11.0.v20130212-222356-bafebe1c16
             [echo] canonical version: 2.11.0-20130212-222356-bafebe1c16
        
        asm.start:
        
        asm.lib:
        
        asm.done:
        
        forkjoin.start:
        
        forkjoin.lib:
        
        forkjoin.pack:
              [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/libs/forkjoin.jar
        
        forkjoin.done:
        
        locker.start:
        
        locker.pre-lib:
        
        locker.lib:
        
        locker.pre-reflect:
        
        locker.reflect:
        
        locker.pre-comp:
        
        locker.comp:
        
        locker.done:
        
        quick.start:
        
        quick.pre-lib:
        
        quick.lib:
        
        quick.swing:
        
        quick.lib.done:
        
        quick.pre-reflect:
        
        quick.reflect:
        
        quick.pre-comp:
        
        quick.comp:
        
        quick.pre-plugins:
        
        quick.plugins:
        
        quick.pre-scalacheck:
        
        quick.scalacheck:
        
        quick.pre-scalap:
        
        quick.scalap:
        
        quick.pre-partest:
        
        quick.partest:
        
        quick.pre-bin:
        
        quick.bin:
        
        quick.done:
        
        pack.start:
        
        pack.pre-lib:
        
        pack.lib:
              [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-library.jar
              [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-actors.jar
        
        pack.swing:
        
        pack.pre-reflect:
        
        pack.reflect:
              [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-reflect.jar
        
        pack.pre-comp:
        
        pack.comp:
              [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-compiler.jar
        
        pack.pre-plugins:
        
        pack.plugins:
              [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/misc/scala-devel/plugins/continuations.jar
        
        pack.scalacheck:
              [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scalacheck.jar
        
        pack.pre-partest:
        
        pack.partest:
              [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-partest.jar
              [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-partest-javaagent.jar
        
        pack.pre-scalap:
        
        pack.scalap:
              [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scalap.jar
        
        pack.pre-bin:
        
        pack.bin:
        
        pack.done:
        
        build:
        
        BUILD SUCCESSFUL
        Total time: 41 seconds
        
        Testing individual files
        testing: [...]/files/run/reflection-java-annotations                  [  OK  ]
        All of 1 tests were successful (elapsed time: 00:00:05)
        
        Show
        Eugene Burmako added a comment - Paul, are you still able to reproduce the issue? I no longer am: 14:03 ~/Projects/Kepler_7112 (ticket/7112)$ t files/run/reflection-java-annotations Buildfile: /Users/xeno_by/Projects/Kepler_7112/build.xml init.jars.check: init.jars: [echo] Updating bootstrap libs. (To do this by hand, run ./pull-binary-libs.sh) [exec] Resolving [943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar] [exec] Resolving [3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar] [exec] Resolving [7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar] [exec] Resolving [7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar] [exec] Resolving [2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar] [exec] Resolving [f93a2525b5616d3a4bee7848fabbb2856b56f653/lib/forkjoin.jar] [exec] Resolving [a5261e70728c1847639e2b47d953441d0b217bcb/lib/jline.jar] [exec] Resolving [f9f41fb909df6a0178906c9fd02e5d0efa15c9ed/lib/scala-compiler-src.jar] [exec] Resolving [c4cd524dc29d298a5034637f6b31122dccb300d6/lib/scala-compiler.jar] [exec] Resolving [2cba5a13ef44bf93133be26cc89ba3a640a5c28f/lib/scala-library-src.jar] [exec] Resolving [d7c6e69eba3dba2f75a0f44e56480cd3dbab8931/lib/scala-library.jar] [exec] Resolving [dbc00bd4b09012aa52e802926dee3f8a02a767ff/lib/scala-reflect-src.jar] [exec] Resolving [c0eed5dee0a3204239c9b35134cad8b3ad140121/lib/scala-reflect.jar] [exec] Resolving [e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar] [exec] Resolving [02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar] [exec] Resolving [981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar] [exec] Resolving [b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar] [exec] Resolving [346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar] [exec] Resolving [be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar] [exec] Resolving [cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar] [exec] Resolving [b6f4dbb29f0c2ec1eba682414f60d52fea84f703/test/files/lib/scalacheck.jar] [exec] Resolving [1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar] [exec] Resolving [a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar] init.maven.tasks: init.maven.jars: [artifact:dependencies] There were no dependencies specified init.hasbuildnum: init.build.snapshot: init.build.release: init.build.nopatch.release: init.build.patch.release: init.hasmavensuffix: init.osgi.suffix: init.osgi.suffix.final: init.osgi.suffix.snapshot: init.build.suffix.done: init.version.git: init.version.release: init.version.snapshot: init.version.done: init.testjava6: init.fail.bad.jdk: init.warn.jdk7: [echo] You are using JDK7 for this build. While this will be able to build most of Scala, it will [echo] not build the Swing project. You will be unable to create a distribution. [echo] init.extra.tasks: [artifact:dependencies] [WARNING] POM for 'biz.aQute:bndlib:pom:1.43.0:compile' is invalid. [artifact:dependencies] [artifact:dependencies] Its dependencies (if any) will NOT be available to the current build. init: [mkdir] Created dir: /Users/xeno_by/Projects/Kepler_7112/lib/extra [echo] build time: 15 February 2013, 14:04:02 [echo] java version: Java HotSpot(TM) 64-Bit Server VM 1.7.0_12-ea (1.7) [echo] java args: -Xms1536M -Xmx3072M -Xss2M -XX:MaxPermSize=512M -XX:+UseParallelGC [echo] javac args: [echo] scalac args: -Yreify-copypaste [echo] scalac quick args: -Yreify-copypaste [echo] git date: 20130212-222356 [echo] git hash: bafebe1c16 [echo] maven version: 2.11.0-SNAPSHOT [echo] OSGi version: 2.11.0.v20130212-222356-bafebe1c16 [echo] canonical version: 2.11.0-20130212-222356-bafebe1c16 asm.start: asm.lib: asm.done: forkjoin.start: forkjoin.lib: forkjoin.pack: [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/libs/forkjoin.jar forkjoin.done: locker.start: locker.pre-lib: locker.lib: locker.pre-reflect: locker.reflect: locker.pre-comp: locker.comp: locker.done: quick.start: quick.pre-lib: quick.lib: quick.swing: quick.lib.done: quick.pre-reflect: quick.reflect: quick.pre-comp: quick.comp: quick.pre-plugins: quick.plugins: quick.pre-scalacheck: quick.scalacheck: quick.pre-scalap: quick.scalap: quick.pre-partest: quick.partest: quick.pre-bin: quick.bin: quick.done: pack.start: pack.pre-lib: pack.lib: [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-library.jar [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-actors.jar pack.swing: pack.pre-reflect: pack.reflect: [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-reflect.jar pack.pre-comp: pack.comp: [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-compiler.jar pack.pre-plugins: pack.plugins: [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/misc/scala-devel/plugins/continuations.jar pack.scalacheck: [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scalacheck.jar pack.pre-partest: pack.partest: [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-partest.jar [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scala-partest-javaagent.jar pack.pre-scalap: pack.scalap: [jar] Building jar: /Users/xeno_by/Projects/Kepler_7112/build/pack/lib/scalap.jar pack.pre-bin: pack.bin: pack.done: build: BUILD SUCCESSFUL Total time: 41 seconds Testing individual files testing: [...]/files/run/reflection-java-annotations [ OK ] All of 1 tests were successful (elapsed time: 00:00:05)
        Hide
        Adriaan Moors added a comment -

        It failed on Java 6 for me last night:

             [echo]        build time: 21 February 2013, 16:39:55
             [echo]      java version: Java HotSpot(TM) 64-Bit Server VM 1.6.0_41 (1.6)
             [echo]          git hash: 9a2455aee4
             [echo]     maven version: 2.10.1-SNAPSHOT
        
          [partest] java.lang.IllegalAccessError: tried to access class JavaSimpleEnumeration_1 from class com.sun.proxy.$Proxy6
          [partest] 	at com.sun.proxy.$Proxy6.v112(Unknown Source)
          [partest] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          [partest] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          [partest] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          [partest] 	at java.lang.reflect.Method.invoke(Method.java:597)
          [partest] 	at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaAnnotationProxy$$anonfun$assocs$2.apply(JavaMirrors.scala:184)
          [partest] 	at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaAnnotationProxy$$anonfun$assocs$2.apply(JavaMirrors.scala:183)
          [partest] 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
          [partest] 
          [partest] 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
          [partest] 	at scala.collection.immutable.List.foreach(List.scala:318)
          [partest] 	at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
          [partest] 	at scala.collection.AbstractTraversable.map(Traversable.scala:105)
          [partest] 	at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaAnnotationProxy.assocs$lzycompute(JavaMirrors.scala:183)
          [partest] 	at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaAnnotationProxy.assocs(JavaMirrors.scala:182)
          [partest] 	at scala.reflect.internal.AnnotationInfos$AnnotationInfo.javaArgs(AnnotationInfos.scala:242)
          [partest] 	at Test$delayedInit$body.apply(Test_2.scala:5)
          [partest] testing: [...]/files/run/reflection-java-annotations                  [FAILED]
        
        Show
        Adriaan Moors added a comment - It failed on Java 6 for me last night: [echo] build time: 21 February 2013, 16:39:55 [echo] java version: Java HotSpot(TM) 64-Bit Server VM 1.6.0_41 (1.6) [echo] git hash: 9a2455aee4 [echo] maven version: 2.10.1-SNAPSHOT [partest] java.lang.IllegalAccessError: tried to access class JavaSimpleEnumeration_1 from class com.sun.proxy.$Proxy6 [partest] at com.sun.proxy.$Proxy6.v112(Unknown Source) [partest] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [partest] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [partest] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [partest] at java.lang.reflect.Method.invoke(Method.java:597) [partest] at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaAnnotationProxy$$anonfun$assocs$2.apply(JavaMirrors.scala:184) [partest] at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaAnnotationProxy$$anonfun$assocs$2.apply(JavaMirrors.scala:183) [partest] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) [partest] [partest] at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) [partest] at scala.collection.immutable.List.foreach(List.scala:318) [partest] at scala.collection.TraversableLike$class.map(TraversableLike.scala:244) [partest] at scala.collection.AbstractTraversable.map(Traversable.scala:105) [partest] at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaAnnotationProxy.assocs$lzycompute(JavaMirrors.scala:183) [partest] at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaAnnotationProxy.assocs(JavaMirrors.scala:182) [partest] at scala.reflect.internal.AnnotationInfos$AnnotationInfo.javaArgs(AnnotationInfos.scala:242) [partest] at Test$delayedInit$body.apply(Test_2.scala:5) [partest] testing: [...]/files/run/reflection-java-annotations [FAILED]
        Hide
        Paul Phillips added a comment -

        1.6.0_41? Is that hot off the presses?

        Show
        Paul Phillips added a comment - 1.6.0_41? Is that hot off the presses?
        Hide
        Adriaan Moors added a comment -

        Yep.

        Show
        Adriaan Moors added a comment - Yep.
        Hide
        Eugene Burmako added a comment -

        Fixed in https://github.com/scala/scala/pull/2159. Submitted PRs against 2.10.1, 2.10.x and master (see #2159 for links to all the variations), so that we can instantaneously fix this error everywhere without having to wait for merges.

        Show
        Eugene Burmako added a comment - Fixed in https://github.com/scala/scala/pull/2159 . Submitted PRs against 2.10.1, 2.10.x and master (see #2159 for links to all the variations), so that we can instantaneously fix this error everywhere without having to wait for merges.
        Show
        James Iry added a comment - https://github.com/scala/scala/pull/2159 https://github.com/scala/scala/pull/2160 https://github.com/scala/scala/pull/2161

          People

          • Assignee:
            Eugene Burmako
            Reporter:
            Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development