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

[AOT] jaotc fails with NoClassDefFoundError when compiling jython

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux

      Description

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      Ubuntu/Linux

      A DESCRIPTION OF THE PROBLEM :
      Here is the directory for test (https://drive.google.com/open?id=0B2RJj-VCppRJX3dZX3pBcURjUUk)

      I want to AOT compile jython by executing the following command:

      "jaotc --output libjython.so --jar jython-standalone-2.7.0.jar -J-cp -J./"

      But it always appears "Exception in thread "main" java.lang.NoClassDefFoundError: zlib$py (wrong name: Lib/zlib$py)"

      And this file I put in the same directory indeed.

      Do I use jaotc incorrectly or a bug? Thanks!


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Exception in thread "main" java.lang.NoClassDefFoundError: zlib$py (wrong name: Lib/zlib$py)
      at java.base/java.lang.ClassLoader.defineClass1(Native Method)
      at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:996)
      at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
      at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:772)
      at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:670)
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:593)
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:551)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:540)
      at java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:890)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:486)
      at jdk.aot/jdk.tools.jaotc.collect.ClassSearch.loadClass(ClassSearch.java:55)
      at jdk.aot/jdk.tools.jaotc.collect.ClassSearch.lambda$search$0(ClassSearch.java:47)
      at jdk.aot/jdk.tools.jaotc.collect.jar.JarFileSource.eachClass(JarFileSource.java:47)
      at jdk.aot/jdk.tools.jaotc.collect.ClassSearch.search(ClassSearch.java:47)
      at jdk.aot/jdk.tools.jaotc.Main.run(Main.java:369)
      at jdk.aot/jdk.tools.jaotc.Main.run(Main.java:306)
      at jdk.aot/jdk.tools.jaotc.Main.main(Main.java:284)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      https://drive.google.com/open?id=0B2RJj-VCppRJX3dZX3pBcURjUUk
      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kvn Vladimir Kozlov
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: