You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
@vargenau this probably means you don't have an SLF4J implementation JAR in your classpath. The reason Spdx-Java-Library doesn't provide one is that there are several choices that are suited for different scenarios/preferences, and it's inappropriate for a library to make that implementation decision on behalf of all downstream consumers.
The solution is to pick one of the SLF4J implementations and add it to your classpath (perhaps via a build file, if you're using a build tool e.g. pom.xml if you're using Maven).
@vargenau do all those files exist in those locations? Also, IIRC tools-java has more dependencies than that, so you'll likely hit further class loading issues until you have the entire transitive dependency graph expressed on the command line.
I'd encourage you to consider using a Maven-based build tool (Maven, Gradle, etc.) instead of trying to manually manage Java dependencies like this - the approach you're taking is quite brittle and error prone.
[edit] and it looks like you're using the "with dependencies" variant of the tools-java JAR, so my advice above isn't relevant - you should simply be able to java -jar that JAR and it should work (unless there's a bug in the build that means that an SLF4J implementation isn't bundled into that JAR - @goneall do you know if that's the case?).
Although the intent of this .jar file is to be used as a standalone app and not a library, I am a bit worried that it may well be used as a library and cause issues for downstream users. That being said, perhaps we should go ahead and merge this since I think most usage is as a standalone Jar.
@pmonks - any thoughts on whether we should merge in PR #158 ?
@pmonks - any thoughts on whether we should merge in PR #158 ?
@goneall added a comment in the PR. I have a vague recollection that it might be possible to achieve both goals (dependency included in uberjar, but completely missing in library jar & pom) via some Maven magic.
Activity
goneall commentedon Jan 18, 2024
I wish I knew - @pmonks do you have any ideas? Perhaps something we should configure in the main part of the app?
note related #43
goneall commentedon Jan 18, 2024
@Gr33ndev - since you've helped out with the java library logging, pinging you to see if you have any solutions
pmonks commentedon Jan 20, 2024
@vargenau this probably means you don't have an SLF4J implementation JAR in your classpath. The reason Spdx-Java-Library doesn't provide one is that there are several choices that are suited for different scenarios/preferences, and it's inappropriate for a library to make that implementation decision on behalf of all downstream consumers.
The solution is to pick one of the SLF4J implementations and add it to your classpath (perhaps via a build file, if you're using a build tool e.g.
pom.xmlif you're using Maven).vargenau commentedon Jan 22, 2024
@pmonks
Thank you for your explanations.
Previously my shell-script was:
I have updated it to:
but I still get the same warnings.
What am I doing wrong?
pmonks commentedon Jan 23, 2024
@vargenau do all those files exist in those locations? Also, IIRC
tools-javahas more dependencies than that, so you'll likely hit further class loading issues until you have the entire transitive dependency graph expressed on the command line.I'd encourage you to consider using a Maven-based build tool (Maven, Gradle, etc.) instead of trying to manually manage Java dependencies like this - the approach you're taking is quite brittle and error prone.
[edit] and it looks like you're using the "with dependencies" variant of the
tools-javaJAR, so my advice above isn't relevant - you should simply be able tojava -jarthat JAR and it should work (unless there's a bug in the build that means that an SLF4J implementation isn't bundled into that JAR - @goneall do you know if that's the case?).vargenau commentedon Jan 25, 2024
Hi @pmonks
Yes, these files exist and are readable.
I even removed the Apple quarantine flag (it's a Mac):
But that does not help.
Anyway, I can live with these warnings.
le-jhe commentedon Mar 18, 2024
I have a proposed fix in the pull request above. Can you review it ?
vargenau commentedon Mar 18, 2024
@goneall
Hi Gary,
Could you please check if this fixes the issue?
Thank you
goneall commentedon Mar 18, 2024
thanks @le-jhe for the analysis and fix.
Although the intent of this .jar file is to be used as a standalone app and not a library, I am a bit worried that it may well be used as a library and cause issues for downstream users. That being said, perhaps we should go ahead and merge this since I think most usage is as a standalone Jar.
@pmonks - any thoughts on whether we should merge in PR #158 ?
pmonks commentedon Mar 19, 2024
@goneall added a comment in the PR. I have a vague recollection that it might be possible to achieve both goals (dependency included in uberjar, but completely missing in library jar & pom) via some Maven magic.