Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grails 5.1.8, Always getting SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" warning, what's wrong ? #12633

Closed
akiesh22 opened this issue Jul 26, 2022 · 8 comments

Comments

@akiesh22
Copy link

akiesh22 commented Jul 26, 2022

Issue description

grails create-app generated scaffolding always produces following errors:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

I tried resolving this as described in "SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details."
but this hasn't gone away, tried https://stackoverflow.com/questions/7421612/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder as suggested here but this didn't resolve it either.

@mattmoss
Copy link
Contributor

I ran into this once before, when IntelliJ was running grails commands via the org.grails.cli.GrailsCli from the grails-shell project, and I believe it's that class/project generating the SLF4J messages, not your application.

@akiesh22 Can you describe an example situation where you see that error?

@akiesh22
Copy link
Author

akiesh22 commented Aug 1, 2022

This is seen for every app generated with grails create-app, for grails 5.1.8.

@mattmoss
Copy link
Contributor

mattmoss commented Aug 1, 2022

@akiesh22 So, can you describe a specific CLI command, IntelliJ action, gradle task, etc... something that allows me to reproduce your issue?

@akiesh22
Copy link
Author

akiesh22 commented Aug 1, 2022

This is all to it.

  1. in CLI : grails create-app logger
  2. Go to intellij IDEA and run the app

Screen Shot 2022-08-01 at 23 35 26

@mattmoss
Copy link
Contributor

mattmoss commented Aug 2, 2022

So, it's cut-off at the top, but I'm certain that IntelliJ is launching your app via the org.grails.cli.GrailsCli class, and the SLF4J error message is coming from that class, not from your application.

I created an app following your step 1 above. Then, running in the same CLI gradle bootRun or grails run-app, I do not see the SLF4J error message.

@akiesh22
Copy link
Author

akiesh22 commented Aug 4, 2022

Thank you very much, you are absolutely correct.

@akiesh22 akiesh22 closed this as completed Aug 4, 2022
@rlconst
Copy link

rlconst commented May 7, 2024

So what the fix? Is is IntelliJIDEA bug?

@mattmoss
Copy link
Contributor

mattmoss commented May 7, 2024

So what the fix? Is is IntelliJIDEA bug?

It's an issue with the org.grails.cli.GrailsCli from the grails-shell module, and would need to be fixed there.

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

No branches or pull requests

4 participants