question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

slf4j-api version change from 1.7.x to 2.0.x between morphia 2.2.8 and 2.2.9 is a breaking change

See original GitHub issue

Describe the bug Morphia 2.2.9 updates slf4j-api from 1.7.x to 2.0.x which breaks downstream consumers that have slf4j implementation targeting 1.7.x.

To Reproduce

  1. Create simple project with dev.morphia.morphia:morphia-core:2.2.9 and ch.qos.logback:logback-classic:1.2.11 in dependencies and try log anything.
// settings.gradle.kts
rootProject.name = "morphia-slf4j"
dependencyResolutionManagement {
  repositories.mavenCentral()
}
// build.gradle.kts
plugins { java; application }
application { mainClass.set("Main") }
dependencies {
  implementation("dev.morphia.morphia:morphia-core:2.2.9")
  implementation("ch.qos.logback:logback-classic:1.2.11")
}
// src/main/java/Main.java
public class Main {
    public static void main(String[] args) {
        org.slf4j.LoggerFactory.getLogger(Main.class).info("ok");
    }
}
  1. Run gradle run
  2. You get following message:
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
SLF4J: Ignoring binding found at [jar:file:/home/gross/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.11/4741689214e9d1e8408b206506cbe76d1c6a7d60/logback-classic-1.2.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.

Expected behavior

Breaking change should at least be documented and avoided at the very least in patch release.

** Please complete the following information: **

  • Server Version: N/A
  • Driver Version: N/A
  • Morphia Version: 2.2.9

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
evanchoolycommented, Nov 8, 2022

Yep. I’m on zulip. if your questions are purely morphia, though, perhaps use the discussions tab here.

1reaction
evanchoolycommented, Nov 8, 2022

I’ll roll it back. I’m about to cut a 2.2.10 release anyway which will, fingers crossed, be (one of?) the last releases of 2.2.x since 2.3 will soon be out.

If you’re using quarkus, have you seen https://github.com/quarkiverse/quarkus-morphia? There’s not a lot there yet but it works with quarkus and might be useful-ish. It will be better once 2.3 lands (and thus critter), though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releases · MorphiaOrg/morphia - GitHub
This release does have a breaking change around a package rename. ... #2124: slf4j-api version change from 1.7.x to 2.0.x between morphia 2.2.8...
Read more >
Morphia Versions - Open Source Agenda
View the latest Morphia versions. ... Version 2.2.9 (2022-09-14) ... #2124: slf4j-api version change from 1.7.x to 2.0.x between morphia 2.2.8 and 2.2.9...
Read more >
Open Source Used In Unified Contact Center Enterprise ...
This document contains licenses and notices for open source software used in this product. With respect to the free/open source software ...
Read more >
Importing ACS 2.0.1 + How to convert 1.7.X to 2.0.1 - YouTube
ACS (Advanced Combat System) is a open source framework which changes drastically how roblox is played, adding realistic behaviours to the ...
Read more >
MorphiaOrg Morphia Statistics & Issues - Codesti
Issue Title State Comments Created Date Updated Date @PrePersist method not invoked sometimes open 6 2022‑11‑09 2022‑11‑28 Dynamic filter building closed 4 2022‑11‑09 2022‑11‑14 Field shadowing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found