Skip to content

META-INF/services/tools.jackson.databind.ObjectMapper references wrong class name (...databind.CBORMapper / ...databind.SmileMapper`) #700

Description

@jafarre-bi

Search before asking

  • I searched in the issues and found nothing similar.

Describe the bug

When I try to use ServiceLoader to load all the available ObjectMapper providers, I get the following exception:

Exception in thread "main" java.util.ServiceConfigurationError: tools.jackson.databind.ObjectMapper: Provider tools.jackson.dataformat.cbor.databind.CBORMapper not found
        at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:559)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1090)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1099)
        at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1142)
        at java.base/java.util.ServiceLoader$1.hasNext(ServiceLoader.java:1164)
        at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1246)

Checking jackson-dataformat-cbor-3.1.4.jar, I see that the file META-INF/services/tools.jackson.databind.ObjectMapper contains tools.jackson.dataformat.cbor.databind.CBORMapper, but the right class is tools.jackson.dataformat.cbor.CBORMapper.

Version Information

3.1.4

Reproduction

  1. Textual explanation: just check the contents of META-INF/services/tools.jackson.databind.ObjectMapper against the actual package for CBORMapper.

Expected behavior

The provider name is correct and ServiceLoader can load it.

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions