Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

Module not found: slf4j.api #40

Open
hubertstruminski opened this issue Jul 10, 2020 · 3 comments
Open

Module not found: slf4j.api #40

hubertstruminski opened this issue Jul 10, 2020 · 3 comments
Assignees
Labels

Comments

@hubertstruminski
Copy link

hubertstruminski commented Jul 10, 2020

Hi,

After I added easyfxml dependency and I used some EasyFXML classes inside my project when I try build project I get error "module not found: slf4j.api".

I have the following dependencies for slf4j:

`

org.slf4j
slf4j-api
1.7.30

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.30</version>
    </dependency>

`

In the module-info.java I have the following lines:

requires java.base; requires java.se; requires org.slf4j; requires org.slf4j.simple;

I can not find any example for resolve this problem in the internet. I tried change versions but it nothing helped.

Error:
Error:java: module not found: slf4j.api

Is someone here who knows solution for this problem ?

@Tristan971
Copy link
Owner

Hi,

After looking around, it seems that SLF4J went from the automatic module name of slf4j.api to an explicit module name of org.slf4j. And indeed this causes

https://github.com/Tristan971/EasyFXML/blob/master/easyfxml/src/main/java/module-info.java#L24

to require something that existed with SLF4J 1.7.26 but not anymore in 1.7.30

I'll make a fix version, thanks for the report

@Tristan971 Tristan971 self-assigned this Jul 11, 2020
@Tristan971 Tristan971 added the bug label Jul 11, 2020
@Tristan971
Copy link
Owner

In the meantime (as I'll update other dependencies and refresh things a bit), using slf4j 1.7.26 should work. see https://jira.qos.ch/browse/SLF4J-420

@Tristan971
Copy link
Owner

Thanks for closing but I'll keep it open until I have it fully fixed

@Tristan971 Tristan971 reopened this Jul 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants