Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8024935

compilation succeeds in java7 but fails in java8

    Details

    • Subcomponent:
    • OS:
      linux_ubuntu

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0-ea"
      Java(TM) SE Runtime Environment (build 1.8.0-ea-b106)
      Java HotSpot(TM) Server VM (build 25.0-b48, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Linux linux-desktop 2.6.32-50-generic #112-Ubuntu SMP Tue Jul 9 20:29:14 UTC 2013 i686 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      Compilation fails in java8
      Environment Ubuntu 10.04 LTS
      1) java source
      import org.springframework.jdbc.core.RowMapper;

      public class GenericRowMapper implements RowMapper<Map<Integer, String>> {
      ...

      2) in java7:

      >sudo update-java-alternatives -s java-7-oracle
      >mvn clean install -Dmaven.test.skip=true
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------

      3) in java8

      >sudo update-java-alternatives -s java-8-oracle
      >mvn clean install -Dmaven.test.skip=true
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Compiler errors :
      error at public class GenericRowMapper implements RowMapper<Map<Integer, String>> {
                                               ^^^^^^^^
      The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files


      REGRESSION. Last worked in version 7u25


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import org.springframework.jdbc.core.RowMapper;

      public class GenericRowMapper implements RowMapper<Map<Integer, String>> {
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      revert to 1.7

        Activity

        Hide
        vromero Vicente Arturo Romero Zaldivar added a comment -
        The bug description is very vague, I don't think that we should be supposed to install Maven, Spring framework, etc, to reproduce a bug. Please provide a reduced test case. Feel free to reopen the bug or create a new one if new information is added.
        Show
        vromero Vicente Arturo Romero Zaldivar added a comment - The bug description is very vague, I don't think that we should be supposed to install Maven, Spring framework, etc, to reproduce a bug. Please provide a reduced test case. Feel free to reopen the bug or create a new one if new information is added.
        Hide
        bvaidya Balchandra Vaidya added a comment -

        Here is an email from Xerxes Rånby to quality-discuss mailing list.

        On 12/13/13 11:20 AM, Xerxes Rånby wrote:
        > Processing 2.1 fails to compile all of its projects using JDK8 EA b119
        > error: The type java.util.Map$Entry cannot be resolved.
        >
        > This issue is a reproducer/reduced test case for:
        > https://bugs.openjdk.java.net/browse/JDK-8024935 - compilation succeeds in java7 but fails in java8
        >
        > I do not have any account at bugs.openjdk.java.net that I can use to update this bug,
        > feel free to attach the information below to the bug.
        >
        > steps to reproduce:
        >
        > #Download processing 2.1 from:
        > https://processing.org/download/
        >
        > tar zxvf processing-2.1-linux32.tgz
        > cd processing-2.1
        > #replace the bundled jdk inside processing with JDK8 EA b119
        > mv java java-bundled
        > mv jdk1.8.0 java
        > #run
        > ./processing
        >
        > Press
        > Sketch->Run
        > without entering any code fails with the following output:
        >
        > Annotation processing got disabled, since it requires a 1.6 compliant JVM
        > /tmp/sketch_131213a3040094527895471164temp/sketch_131213a.java:1: error: The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
        > import processing.core.*;
        > ^
        > 1 problem (1 error)
        Show
        bvaidya Balchandra Vaidya added a comment - Here is an email from Xerxes Rånby to quality-discuss mailing list. On 12/13/13 11:20 AM, Xerxes Rånby wrote: > Processing 2.1 fails to compile all of its projects using JDK8 EA b119 > error: The type java.util.Map$Entry cannot be resolved. > > This issue is a reproducer/reduced test case for: > https://bugs.openjdk.java.net/browse/JDK-8024935 - compilation succeeds in java7 but fails in java8 > > I do not have any account at bugs.openjdk.java.net that I can use to update this bug, > feel free to attach the information below to the bug. > > steps to reproduce: > > #Download processing 2.1 from: > https://processing.org/download/ > > tar zxvf processing-2.1-linux32.tgz > cd processing-2.1 > #replace the bundled jdk inside processing with JDK8 EA b119 > mv java java-bundled > mv jdk1.8.0 java > #run > ./processing > > Press > Sketch->Run > without entering any code fails with the following output: > > Annotation processing got disabled, since it requires a 1.6 compliant JVM > /tmp/sketch_131213a3040094527895471164temp/sketch_131213a.java:1: error: The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files > import processing.core.*; > ^ > 1 problem (1 error)
        Hide
        vromero Vicente Arturo Romero Zaldivar added a comment -
        I would need from the reporter where I can find the definition of class GenericRowMapper, please send it to compiler-dev list.
        Show
        vromero Vicente Arturo Romero Zaldivar added a comment - I would need from the reporter where I can find the definition of class GenericRowMapper, please send it to compiler-dev list.
        Hide
        vromero Vicente Arturo Romero Zaldivar added a comment -
        according to this mail from the reporter: http://mail.openjdk.java.net/pipermail/compiler-dev/2013-December/008323.html, the bug was in eclipse compiler, not in javac.
        Show
        vromero Vicente Arturo Romero Zaldivar added a comment - according to this mail from the reporter: http://mail.openjdk.java.net/pipermail/compiler-dev/2013-December/008323.html, the bug was in eclipse compiler, not in javac.

          People

          • Assignee:
            vromero Vicente Arturo Romero Zaldivar
            Reporter:
            coffeys Sean Coffey
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: