Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2347

Remove invalid service descriptors from gremlin-shaded

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.4.5
    • 3.5.0, 3.3.11, 3.4.7
    • build-release
    • None

    Description

      gremlin-shaded.jar contains a couple of service descriptors inherited from Jackson:

      META-INF/services/com.fasterxml.jackson.core.JsonFactory
      META-INF/services/com.fasterxml.jackson.core.ObjectCodec
      

      They still reference unshaded classes, for example in the first one:

      com.fasterxml.jackson.core.JsonFactory
      

      This creates a problem if the JAR is used as an automatic module in a JPMS application. The module system tries to convert the files into provides directives in the dynamically generated module descriptor, but it checks for the existence of the types in the process:

      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for /path/to/gremlin-shaded-3.4.5.jar
      Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class com.fasterxml.jackson.core.JsonFactory not in module
      

      I didn't find a way to work around this error without modifying the JAR.

      I think the best approach would be to filter out those files during the shading process. They were wrong anyway, so it's unlikely that anyone will miss them.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            spmallette Stephen Mallette
            omichallat Olivier Michallat
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment