Eclipse fails to launch on macOS Sierra - eclipse

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.

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.

Trying to run a clean build headlessly on eclipse

I am trying to create a script that can clean build a project I am working on in Eclipse.
The issue is with the command to run a clean build using Eclipse headless. This is the command I am using:
Eclipse.app/Contents/MacOS/eclipse --launcher.suppressErrors -nosplash -data "~/git/SwingJS" -application org.eclipse.cdt.managedbuilder.core.headlessbuild -cleanBuild
This is essentially the structure of the command listed here GNU ARM Eclipse (Looking at the main docs page of Eclipse is unhelpful as well).
The specific error message I am getting is as following:
org.eclipse.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will try after the state location is initialized.
org.eclipse.m2e.logback.configuration: Logback config file: /Users/andrewlee/git/SwingJS/.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://954.fwk1087712231:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://954.fwk1087712231:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html for an explanation.SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]org.eclipse.m2e.logback.configuration: Initializing logbackWARNING: No Project matched "swingjs". Skipping...
Now the paths I have in the command are correct as far as I know.
Project directory is not in .../workspace/SwingJS since I imported the project from Git using the Eclipse Git tool, and in that case, it keeps the project in $HOME/git/Project by default.
Furthermore, the Project name should be "swingjs", yet in the log, it says "WARNING: No Project matched "swingjs". Skipping..."
I would appreciate if someone who has actually successfully done this before gave me the specific commands they used to clean build an Eclipse project headlessly.
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.

How do I find and eliminate an unwanted entry in my Eclipse classpath?

Our source code repository has an Eclipse run configuration in .settings/Program.launch, a classpath configuration in .classpath, and a set of user libraries we were all directed to import months ago by the Eclipse expert who used to be in our office. The user library set includes a defined user library named JBoss6.0.0.Final that points to all or most of the jars inside of JBoss, and the Program.launch run configuration includes this JBoss6.0.0.Final user library.
I'm now getting a conflict from slf4j telling me I need to remove one of the slf4j binding jars in my classpath:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/workspace/project/core/lib/slf4j-log4j12-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/jboss-6.0.0.Final/client/slf4j-jboss-logging.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]
I understand why I'm getting this warning, and I want to fix the situation by taking slf4j-jboss-logging.jar out of the classpath for Program.launch . I went to Window -> Preferences -> Java -> Build Path -> User Libraries, I opened the JBoss6.0.0.Final user library, and I removed slf4j-jboss-logging.jar . But when I run, I still get the same warning.
What is including this jar in my classpath? I want to remove it.
I exported my user libraries to an XML file and searched through it and slf4j-jboss-logging.jar is not in there at all. I read the Project.launch file and it doesn't refer to this jar. The .classpath file does not reference this jar, but it does include the following line, which I think pulls in the JBoss6.0.0.Final user library:
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JBoss6.0.0.Final"/>
I looked at the classpath tab under the run configurations for Project.launch, and it appears to be showing everything defined by the .classpath file.
Where is this offending jar coming from in my classpath?
I'm running Eclipse Indigo.
Try using jboss-classloading.xml, this should allow you to isolate your jars from those in included in jboss.
See if this link helps.

Runtime error with "GWT 2.4 - expenses sample"

I am using Eclipse Indigo for Java EE (and I have installed the m2e plugin).
I have a runtime error when launching the "expense" sample given with GWT 2.4. I launch it, the app load, then draw the interface and after the console give this error :
Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Successfully processed D:\DL\000-code2012\0-ALL-SRC\6-Expenses\src\main\webapp\WEB-INF/appengine-web.xml
Successfully processed D:\DL\000-code2012\0-ALL-SRC\6-Expenses\src\main\webapp\WEB-INF/web.xml
The server is running at http://localhost:8888/
log4j:WARN No appenders could be found for logger (org.hibernate.validator.util.Version).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Sat May 05 12:03:40 BOT 2012 com.google.gwt.sample.expenses.client.ExpensesShell
SEVERE: One or more exceptions caught, see full set in UmbrellaException#getCauses
com.google.web.bindery.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:299)
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$4.onTransportSuccess(AbstractRequestContext.java:951)
at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
etc......
Firstly, to compile successfully the projet I had to quick fix 2 errors in the POM.xml (it was impossible to download files from 2 repositories...so I had to ignore them).
Then, if it is because I have not the "buildhelper" plugin for maven, I just can not found it (I tried it with Maven > Discovery > Catalog)...
I also configured correctly (I suppose) the java compiler for the annotation processing.
Finally, when I clean or compile the project I have a this error (A problem occured) :
Cannot run program "C:\glassfish3\jdk7\bin\javaw.exe" (in directory "D:\DL\000-code2012\0-ALL-SRC\6-Expenses"): CreateProcess error=206, filename or extension too long
Cannot run program "C:\glassfish3\jdk7\bin\javaw.exe" (in directory "D:\DL\000-code2012\0-ALL-SRC\6-Expenses"): CreateProcess error=206, filename or extension too long
It is written twice when I click on "Details"
Could somebody has a solution for this problem ?
Thank you.