Log4j warnings on linux - titan

its my first day with Titan Database, I just wanna ask if I should worry about those warnings ?!
the link provided to help me solving this issue is quite complicated
Linux Ubuntu 14.04, and I did installed JDK 8, Titan 1.0.0 with Hadoop 1
Jan 17, 2016 5:04:20 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: aurelius.titan
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/phoenix/Titan/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/phoenix/Titan/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
log4j:WARN No appenders could be found for logger (org.apache.hadoop.security.Groups).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
plugin activated: tinkerpop.hadoop
plugin activated: tinkerpop.tinkergraph
gremlin>

You can ignore the log4j warnings.

In order to remove the warning - delete the file 'logback-classic-1.1.2.jar' from 'libs' folder.

Related

Eclipse running SpringBoot: SLF4J: Class path contains multiple SLF4J bindings

Whenever I fire up a SpringBoot-based application (run as Maven build / goal spring-boot:run) I get the infamous SLF4J Warning:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/U:/eclipse/eclipse-jee/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/U:/eclipse/eclipse-jee/configuration/org.eclipse.osgi/8/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
That warning annoys me greatly because when demoing an application from Eclipse the first thing the potential customers or users are seeing is a big red superfluous warning. I HATE that! It looks so unprofessional!
Now - in principle the warning is clear: there are two SLF4J bindings and one should get rid of one of them. I found misc. descriptions of the same error some of which also explain how to locate the (usually transitive) dependency and then exclude one of them from the dependencies in the pom.
I tried that and non of these suggestions worked for me! Also the solution proposed in
Eclipse Maven: SLF4J: Class path contains multiple SLF4J bindings (namely to use an external Maven installation) did NOT work!
Looking closer at the paths listed in the warning I would claim, that there are already two bindings in eclipse itself (in the plugins org.eclipse.osgi... and in org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar) and that probably explains why my attempts were fruitless: mangling the application's pom doesn't change anything regarding these Eclipse-internal bindings. The mentioned append comes to the same conclusion: it's a bug inside eclipse.
But does anyone have an idea what it would need to get rid of that warning? I am open to all kind of "hacks"! Could one e.g. "massage" the ...m2e.maven.runtime.'s jar to no longer contain the org/slf4j/impl/StaticLoggerBinder.class (or probably rather its containing jar)? Or are there better/safer ways?
What would be needed to get rid of that warning in Eclipse?
for me Eclipse Maven: SLF4J: Class path contains multiple SLF4J bindings work. In Debian Linux I add /usr/share/maven to Window/Preferences/Maven/Installations and these warnings disappeared.

Spring Tool Suite (Eclipse): Update to 4.7 causes multiple SLF4J bindings

After I updated my STS based on Eclipse to 4.7, the build starts with a warning:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/A329865/OneDrive/Apps/sts-4.6.0.RELEASE/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/A329865/OneDrive/Apps/sts-4.6.0.RELEASE/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/A329865/OneDrive/Apps/sts-4.6.0.RELEASE/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/A329865/OneDrive/Apps/sts-4.6.0.RELEASE/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
Even when I use a new STS 4.7 the same warning occurs.
I think the problem can be found in this line:
SLF4J: Found binding in [file:/C:/Users/A329865/OneDrive/Apps/sts-4.6.0.RELEASE/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
But I don't know how to deactivate it. It's not a plugin or jar-file. It seems to be a part of the osgi bundle.
Maybe my assumption is wrong, but can anybody help me?

Eclipse fails to launch on macOS Sierra

I am having an issue with launching Eclipse on my macOS. Out of nowhere, the application fails to even launch. I navigated through terminal to the directory where the loader file is located (/Applications/Eclipse.app/Contents/MacOS) and executed the file using ./eclipse which returned the following error.
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will retry after the state location is initialized.
org.eclipse.m2e.logback.configuration: Logback config file: /Users/Viswanath/Documents/workspace/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.7.0.20160603-1933.xml
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [bundleresource://463.fwk46259342:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://463.fwk46259342:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
org.eclipse.m2e.logback.configuration: Initializing logback
***WARNING: Display must be created on main thread due to Cocoa restrictions.
***WARNING: Display must be created on main thread due to Cocoa restrictions.
***WARNING: Display must be created on main thread due to Cocoa restrictions.
What does the error signify? The application failed to launch in the safe boot mode as well. I further tried deleting existing Eclipse MARS installation, and installed Eclipse Neon which showed the same behavior. Any help on this issue is appreciated.
OS: macOS Sierra
Device: MacBook Air
Thank you,
Viswanath.

NoClassDefFoundError (Could not initialize class org.apache.log4j.Log4jLoggerFactory)

I have a maven project under Eclipse Luna SR2 (4.4.2). This project uses slf4j through maven dependencies.
Infinitest is running continuous integration and it works in a lot of case, except for static slf4j declarations as
#Component
public class UnitProcessor implements Processor {
private static Logger logger = LoggerFactory.getLogger(UnitProcessor.class);
...
where I got this message
NoClassDefFoundError (Could not initialize class org.apache.log4j.Log4jLoggerFactory)
Of course, there's no exception nor problem in Eclipse itself when I run involved class. No problem in maven too.
Infinitest console wrote :
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/mde.DSI/.m2/repository/org/slf4j/slf4j-log4j12/1.5.10/slf4j-log4j12-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/mde.DSI/.m2/repository/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
SLF4J: The requested version 1.5.10 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
SLF4J: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError.
SLF4J: See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.
How to get out of this hell ?
Thanks

Unable to reset proxy in Eclipse MARS

I installed CDT on top of Eclipse MARS IDE for JAVA developers on Fedora 22. After a reboot, I am unable to reset proxy in Eclipse. When I click on Network Connections I get an error message The currently displayed page contains invalid values.
After the error message
The Active provider has to be set to 'Manual', but the drop down list is now missing.
Eclipse starts with the following messages:
org.eclipse.m2e.logback.configuration: The
org.eclipse.m2e.logback.configuration bundle was activated before the
state location was initialized. Will retry after the state location
is initialized. org.eclipse.m2e.logback.configuration: Logback config
file:
/root/workspace/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.6.2.20150902-0002.xml
SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found
binding in
[bundleresource://472.fwk12572413:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[bundleresource://472.fwk12572413:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation. SLF4J: Actual binding is of type
[ch.qos.logback.classic.util.ContextSelectorStaticBinder]
org.eclipse.m2e.logback.configuration: Initializing logback
There are no messages even after the error is encountered. Which configuration file should I change to reset proxy?
Unfortunately this is known issue with the latest eclipse mars version.
Description could be found here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=479075
Workaround:
create file "org.eclipse.core.net.prefs" under ${eclipse.install.dir}/configuration/.settings with content:
nonProxiedHosts=localhost
Did you move your install directory ?
Because this exact same problem happend to me after I (brutally) moved the Eclipse install directories.
A re-install cleared the problem.