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

Compilation errors for JAVA SOURCE ADMIN.ZIP/ZIP

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux_oracle_5.6
    • Verification:
      Verified

      Description

      FULL PRODUCT VERSION :
      java version "1.7.0_91"
      OpenJDK Runtime Environment (rhel-2.6.2.2.0.1.el6_7-x86_64 u91-b00)
      OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Linux servtesting 3.8.13-98.4.1.el6uek.x86_64 #2 SMP Wed Sep 23 18:46:01 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Error: An exception has occurred in the compiler (1.6.0_71).
      Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates.
      Include your program and the following diagnostic in your report.
      Thank you.

      Error: java.lang.ClassCastException
      Line: 0
      #13#10Error: at com.sun.tools.javac.code.Types.elemtype(Types.java)
      #13#10Error: at com.sun.tools.javac.code.Types.isSubtypeUnchecked(Types.java)
      #13#10Error: at com.sun.tools.javac.code.Types.isConvertible(Types.java)
      #13#10Error: at com.sun.tools.javac.code.Types.isAssignable(Types.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Check.checkType(Check.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.check(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitNewArray(Attr.java:1536)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCNewArray.accept(JCTree.java:1294)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStat(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStats(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStat(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStat(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribClass(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2564)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1140)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:837)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:799)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java)
      Line: 0
      #13#10Error: at oracle.aurora.jdkcompiler.JdkDriver.compile(JdkDriver.java)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler.doCompile(Compiler.java:670)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler.access$000(Compiler.java:57)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler$1.run(Compiler.java:324)
      Line: 0
      #13#10Error: at java.security.AccessController.doPrivileged(Native Method)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler.compile(Compiler.java:322)
      Line: 0


      A DESCRIPTION OF THE PROBLEM :

      Compilation errors for JAVA SOURCE ADMIN.ZIP/ZIP
      #13#10Error: An exception has occurred in the compiler (1.6.0_71).
      Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates.
      Include your program and the following diagnostic in your report.
      Thank you.

      Error: java.lang.ClassCastException
      Line: 0
      #13#10Error: at com.sun.tools.javac.code.Types.elemtype(Types.java)
      #13#10Error: at com.sun.tools.javac.code.Types.isSubtypeUnchecked(Types.java)
      #13#10Error: at com.sun.tools.javac.code.Types.isConvertible(Types.java)
      #13#10Error: at com.sun.tools.javac.code.Types.isAssignable(Types.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Check.checkType(Check.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.check(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitNewArray(Attr.java:1536)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCNewArray.accept(JCTree.java:1294)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStat(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStats(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStat(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStat(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribClass(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2564)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1140)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:837)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:799)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java)
      Line: 0
      #13#10Error: at oracle.aurora.jdkcompiler.JdkDriver.compile(JdkDriver.java)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler.doCompile(Compiler.java:670)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler.access$000(Compiler.java:57)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler$1.run(Compiler.java:324)
      Line: 0
      #13#10Error: at java.security.AccessController.doPrivileged(Native Method)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler.compile(Compiler.java:322)
      Line: 0


      REGRESSION. Last worked in version 6u43

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      compile java source on Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      java source compiled.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Compilation errors for JAVA SOURCE ADMIN.ZIP/ZIP
      #13#10Error: An exception has occurred in the compiler (1.6.0_71).
      Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates.
      Include your program and the following diagnostic in your report.
      Thank you.

      Line: 0
      #13#10Error: java.lang.ClassCastException
      Line: 0
      #13#10Error: at com.sun.tools.javac.code.Types.elemtype(Types.java)
      #13#10Error: at com.sun.tools.javac.code.Types.isSubtypeUnchecked(Types.java)
      #13#10Error: at com.sun.tools.javac.code.Types.isConvertible(Types.java)
      #13#10Error: at com.sun.tools.javac.code.Types.isAssignable(Types.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Check.checkType(Check.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.check(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitNewArray(Attr.java:1536)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCNewArray.accept(JCTree.java:1294)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStat(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStats(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStat(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribTree(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribStat(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribClass(Attr.java)
      Line: 0
      #13#10Error: at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2564)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1140)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:837)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:799)
      Line: 0
      #13#10Error: at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java)
      Line: 0
      #13#10Error: at oracle.aurora.jdkcompiler.JdkDriver.compile(JdkDriver.java)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler.doCompile(Compiler.java:670)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler.access$000(Compiler.java:57)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler$1.run(Compiler.java:324)
      Line: 0
      #13#10Error: at java.security.AccessController.doPrivileged(Native Method)
      Line: 0
      #13#10Error: at oracle.aurora.rdbms.Compiler.compile(Compiler.java:322)
      Line: 0


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      create or replace and compile java source named "zip/Zip" as
      package zip;

      import java.io.File;
      import java.io.FileInputStream;
      import java.io.FileOutputStream;
      import java.io.IOException;
      import java.io.InputStream;
      import java.io.PrintStream;

      import java.util.logging.Level;
      import java.util.logging.Logger;
      import java.util.zip.ZipEntry;
      import java.util.zip.ZipOutputStream;


      /**
       *
       * @author ariquelme
       */

      public class Zip {

          public static void archivo(String origen, String destino, String nombreArchivo) throws IOException{
           try {
                 Zip.compress(new File(origen), destino, nombreArchivo);
                }
           catch (IOException ex) {
                  Logger.getLogger(Zip.class.getName()).log(Level.SEVERE, null, ex);
                }
           }




           public static void compress(File file, String destino, String archivo)throws IOException {

              //byte[] b = new byte[512];
              byte b[] = new byte[1];
              
              FileOutputStream out = new FileOutputStream(destino + archivo + ".zip");
              ZipOutputStream zout = new ZipOutputStream(out);
              InputStream in = new FileInputStream(file);

              ZipEntry e = new ZipEntry(file.getName());
              zout.putNextEntry(e);

              int len = 0;

              /*while ((len = in.read(b)) != -1) {
                  zout.write(b, 0, len);
              }*/

              zout.closeEntry();

         // print(e);
              zout.close();


          }



          public static void print(ZipEntry e) {

              PrintStream err = System.err;
              err.print("added " + e.getName());

              if (e.getMethod() == ZipEntry.DEFLATED) {

                  long size = e.getSize();

                  if (size > 0) {

                      long csize = e.getCompressedSize();
                      long ratio = ((size - csize) * 100) / size;
                      err.println(" (deflated " + ratio + "%)");
                  } else {
                      err.println(" (deflated 0%)");
                  }
              } else {
                  err.println(" (stored 0%)");
              }
          }


      }
      ---------- END SOURCE ----------

      SUPPORT :
      YES

        Attachments

          Activity

            People

            Assignee:
            aroy Abhijit Roy (Inactive)
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: