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

Source launcher fails with "Module reads more than one module named" error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 24
    • tools
    • None
    • Cause Known

      For certain setups with multiple user modules including ones with automatic module names in their manifest (no explicit module-info.class is provided) the source launcher fails with "Module M reads more than one module named N" error. For example:
      ```
      Exception in thread "main" java.lang.module.ResolutionException: Module org.postgresql.jdbc reads more than one module named org.xerial.sqlitejdbc
              at java.base/java.lang.module.Resolver.resolveFail(Resolver.java:900)
              at java.base/java.lang.module.Resolver.checkExportSuppliers(Resolver.java:721)
              at java.base/java.lang.module.Resolver.finish(Resolver.java:380)
              at java.base/java.lang.module.Configuration.<init>(Configuration.java:139)
              at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:493)
              at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:297)
              at jdk.compiler/com.sun.tools.javac.launcher.MemoryContext.newClassLoaderFor(MemoryContext.java:229)
      ...
      ```

      Original reporter: Ethan McCue

            cstein Christian Stein
            cstein Christian Stein
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: