Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-10003 Support JDK 17 on Geode
  3. GEODE-9657

Javadoc errors occur on Java 17 due to split packages in Geode

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 1.13.4, 1.14.0
    • None
    • core

    Description

      When trying to build any library, framework (e.g. Spring Data for Apache Geode (SDG)) or application with Apache Geode on Java 17, Javadoc errors occur.

      For example:

      22:36:52  [ERROR] /opt/jenkins/data/workspace/spring-data-geode_3.0.x/spring-data-geode/src/main/java/org/springframework/data/gemfire/function/PojoFunctionWrapper.java:53: error: cannot access Identifiable
      22:36:52  [ERROR] public class PojoFunctionWrapper implements Function {
      22:36:52  [ERROR]        ^
      22:36:52  [ERROR]   class file for org.apache.geode.lang.Identifiable not found
      

      As it turns out, in Java 17, the Javadoc tool now uses Java modules. Javadoc is started with:

      javadoc … --add-modules ALL-MODULE-PATH --module-path --patch-module …
      

      geode-core-1.14.0.jar ships org.apache.geode.lang.AttachAPINotFoundException and geode-common-1.14.0.jar ships org.apache.geode.lang.Identifiable. Due to this split-package arrangement, Javadoc isn’t discovering Identifiable because it has found the package org.apache.geode.lang in geode-core-1.14.0.jar.

      The best course of action is to make sure all org.apache.geode.lang sub-packages and class are in 1 JAR (e.g. geode-common) or the other (i.e. geode-core).

      Attachments

        Activity

          People

            Unassigned Unassigned
            jblum John Blum
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: