Library loader does not seem to resolve jackson annotations

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • Environment:

      Server is 1.20.5 running on pterodactyl panel (locally) on linux.

    • CraftBukkit version 4123-Spigot-b698b49-90f1059 (MC: 1.20.5) (Implementing API version 1.20.5-R0.1-SNAPSHOT)
    • Yes

      Alright so, I have a plugin with the following libraries in plugin.yml

       

      libraries: 
        - org.flywaydb:flyway-core:10.11.1

      NOTE: I removed libraries that i believe have nothing to do with this bug.

       

      If you try to use flywaydb, You will get an error like this:

       

      java.lang.NoClassDefFoundError: com/fasterxml/jackson/annotation/JsonView
              at com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector.<clinit>(JacksonAnnotationIntrospector.java:37) ~[?:?]
              at com.fasterxml.jackson.databind.ObjectMapper.<clinit>(ObjectMapper.java:375) ~[?:?]
              at org.flywaydb.core.extensibility.ConfigurationExtension.copy(ConfigurationExtension.java:40) ~[?:?]
              at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
              at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708) ~[?:?]
              at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
              at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
              at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) ~[?:?]
              at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) ~[?:?]
              at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) ~[?:?]
              at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) ~[?:?]
              at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) ~[?:?]
              at org.flywaydb.core.internal.plugin.PluginRegister.getCopy(PluginRegister.java:100) ~[?:?]
              at org.flywaydb.core.api.configuration.ClassicConfiguration.configure(ClassicConfiguration.java:1348) ~[?:?]
              at org.flywaydb.core.api.configuration.ClassicConfiguration.<init>(ClassicConfiguration.java:261) ~[?:?]
              at org.flywaydb.core.Flyway.<init>(Flyway.java:116) ~[?:?]
              at org.flywaydb.core.api.configuration.FluentConfiguration.load(FluentConfiguration.java:65) ~[?:?]

      This error comes from the jackson annotations module. It looks like the server did not download or load it while resolving libraries on startup. However, doing this on a 1.20.4 server the plugin runs fine.

      Adding "com.fasterxml.jackson.core:jackson-annotations:2.15.2" to plugin.yml fixes the issue as the library is downloaded and loaded. You aren't supposed to do that and it should be loaded normally as it is a transitive dependency.

       

      This bug was not really tested much. Feel free to correct me if i misunderstand something. People from the discord server have directed me to create a bug report here.

            Assignee:
            Unassigned
            Reporter:
            Yahia Mohamed
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: