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

Eclipse 2021-03 (4.19) won't start after installing https://dist.springsource.org/snapshot/GRECLIPSE/e4.19 #1237

Closed
ErnieZapata opened this issue Mar 20, 2021 · 23 comments
Assignees
Labels
Milestone

Comments

@ErnieZapata
Copy link

New installation of Eclipse 2021-03 (4.19) into new directory, using new workspace directory under Windows 10 with AdoptOpenJDK 11.0.8.

Started normally after clean install, but after installing latest snapshot for GRECLIPSE for 4.19, each startup fails and eclipse display a popup dialog:

An error has occurred. See the log file {workspace.dir}/.metadata/.log.

Tried starting eclipse with "-clean", but same outcome.

Log file attached.

log.txt

@SamPF53
Copy link

SamPF53 commented Mar 22, 2021

I'm also seeing this issue. Clean install of eclipse works fine. As soon as I install Groovy Development Tools from the Eclipse Marketplace and restart Eclipse, I get the same issue

@eric-milles
Copy link
Member

The compiler version switcher seems to have run into a new conflict. One thing you can do is remove the logback bundle: #981 (comment)

@ErnieZapata
Copy link
Author

Thanks for the suggestion.

You have to remove the logback bundle immediately after installation, before you restart Eclipse.

Otherwise, you just get a popup dialog stating "An error has occurred. See the log file {workspace.dir}/.metadata/.log." on start up and can't get back into Eclipse.

@BorisYellnikov
Copy link

I have the same problem.
New installation of Eclipse 2021-03 (4.19) into new directory, using new workspace directory under Windows 10 with AdoptOpenJDK 11.0.8.

Started normally after clean install, but after installing latest snapshot for GRECLIPSE for 4.19, each startup fails and eclipse display a popup dialog:

An error has occurred. See the log file {workspace.dir}/.metadata/.log.

Tried starting eclipse with "-clean", but same outcome.

Log file attached.

log.txt

@eric-milles
Copy link
Member

When you say "fresh install", what package did you start with? Starting from Platform Runtime Binary, I can add

  Buildship: Eclipse Plug-ins for Gradle	3.1.5.v20210113-0929	org.eclipse.buildship.feature.group	Eclipse Buildship
  EclEmma Java Code Coverage	3.1.4.202012082030	org.eclipse.eclemma.feature.feature.group	Eclipse EclEmma
  Eclipse Groovy Development Tools	4.1.0.202103231132	org.codehaus.groovy.all.feature.group	Pivotal Software, Inc.
  Eclipse JDT Core patch for Groovy	4.1.0.202103231132	org.codehaus.groovy.jdt.patch.feature.group	Pivotal Software, Inc.
  Eclipse JDT Plug-in Developer Resources	3.18.700.v20210303-1800	org.eclipse.jdt.source.feature.group	Eclipse.org
  Eclipse PDE Plug-in Developer Resources	3.14.700.v20210303-1800	org.eclipse.pde.source.feature.group	Eclipse.org
  Eclipse Platform	4.19.0.I20210303-1800	org.eclipse.platform.ide	Eclipse.org
  Eclipse Platform Plug-in Developer Resources	4.19.0.v20210303-1800	org.eclipse.platform.source.feature.group	Eclipse.org
  Eclipse Test Framework	3.7.1400.v20210222-1948	org.eclipse.test.feature.group	Eclipse.org
  Git integration for Eclipse	5.11.0.202103091610-r	org.eclipse.egit.feature.group	Eclipse EGit
  m2e - Extensions Development Support (Optional)	1.17.2.20210219-1922	org.eclipse.m2e.sdk.feature.feature.group	Eclipse.org - m2e
  m2e - Maven Integration for Eclipse (includes Incubating components)	1.17.2.20210219-1922	org.eclipse.m2e.feature.feature.group	Eclipse.org - m2e
  m2e - slf4j over logback logging (Optional)	1.17.0.20200924-1339	org.eclipse.m2e.logback.feature.feature.group	Eclipse.org - m2e
  m2e connector for mavenarchiver pom properties	0.17.5.202002191804	org.sonatype.m2e.mavenarchiver.feature.feature.group	Sonatype, Inc.

plus Groovy Development Tools and Groovy Compiler 4.0. Starts fine. Switches to Groovy Compiler 2.5 fine.

@eric-milles
Copy link
Member

If you use Oracle JDK, does it do the same thing?

@BorisYellnikov
Copy link

Yes, I use Oracle JDK.

@SamPF53
Copy link

SamPF53 commented Mar 24, 2021

Windows 10

jdk:
openjdk version "11.0.10" 2021-01-19 LTS
OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS)
OpenJDK 64-Bit Server VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode)

For me, I'm:

  1. installing the latest "Eclipse IDE for Enterprise Java and Web Developers"
  2. new eclipse workspace (no code)
  3. Install the Groovy Development Tools plugin from the Eclipse Marketplace
  4. it prompts me to restart, so I do
  5. Error "An error has occurred. See the log file .../.metadata/.log." (log attached below)

log.txt

@eric-milles
Copy link
Member

It is the plugin bundle ch.qos.logback.classic_1.2.3.v20200428-2012.jar the has links back to groovy. If you remove it from your plugins folder, eclipse should start. I am looking into restricting the bundle exports of the groovy compiler bundle to prevent this linkage.

@farukonfly
Copy link

It is the plugin bundle ch.qos.logback.classic_1.2.3.v20200428-2012.jar the has links back to groovy. If you remove it from your plugins folder, eclipse should start. I am looking into restricting the bundle exports of the groovy compiler bundle to prevent this linkage.

Does work for me,thank you

@will-lauer
Copy link

I'm seeing this same issue. With a fresh install using the of Eclipse 2021-03 "Eclipse IDE for Java Developers" using the Eclipes Installer, it works. But with "Eclipse IDE for Enterprise Java and Web Developers" it fails.

@sinhote
Copy link

sinhote commented Apr 6, 2021

Same issue here.

It is the plugin bundle ch.qos.logback.classic_1.2.3.v20200428-2012.jar the has links back to groovy. If you remove it from your plugins folder, eclipse should start. I am looking into restricting the bundle exports of the groovy compiler bundle to prevent this linkage.

I don't even have that file after a fresh Eclipse installation with the Oomph installer (Eclipse for Enterprise Java and web Developers) + installing the Groovy plugin from the marketplace.

@sinhote
Copy link

sinhote commented Apr 6, 2021

Same issue here.

It is the plugin bundle ch.qos.logback.classic_1.2.3.v20200428-2012.jar the has links back to groovy. If you remove it from your plugins folder, eclipse should start. I am looking into restricting the bundle exports of the groovy compiler bundle to prevent this linkage.

I don't even have that file after a fresh Eclipse installation with the Oomph installer (Eclipse for Enterprise Java and web Developers) + installing the Groovy plugin from the marketplace.

Ah, found it. In my case, it was under ${HOME}/.p2/plugins, not under Eclipse's installation folder.

Thanks for the tip!

@eric-milles
Copy link
Member

@sinhote You can uninstall the feature "m2e - slf4j over logback logging" instead of removing jars from your bundle pool directory.

@sinhote
Copy link

sinhote commented Apr 6, 2021

@sinhote You can uninstall the feature "m2e - slf4j over logback logging" instead of removing jars from your bundle pool directory.

@eric-milles Sorry if I sound too blunt, but I think you are not reading when we say "Eclipse won't start". How are we supposed to uninstall features if we cannot even start the program?

@eric-milles
Copy link
Member

An alternative to get Eclipse to start so you can uninstall the feature would be to set the starting Groovy Compiler version under <workspace>/.metadata/org.eclipse.core.runtime/.settings/org.codehaus.groovy.eclipse.compilerResolver.prefs (see #1229) to -1 or clear the setting or delete the file.

@eric-milles
Copy link
Member

When installing Groovy Development Tools, you should now be presented with this dialog:

image

If you choose to proceed, the resulting eclipse install should not have an issue with multiple Groovy Compiler bundles.

@edu-de
Copy link

edu-de commented Apr 23, 2021

I think this should be documented somewhere. The plugin was really difficult to install, until I found this. By selecting the settings in @eric-milles screenshot, it finally worked. Here: https://marketplace.eclipse.org/content/groovy-development-tools some other user seems to have the same problem.

@kwin
Copy link

kwin commented Jun 18, 2021

m2e - slf4j over logback is a default feature of multiple distributions (e.g. https://www.eclipse.org/downloads/packages/release/2021-06/r/eclipse-ide-enterprise-java-and-web-developers) and uninstalling that leads to the fact that m2e does no longer log anything to the m2e console, so for me this is not a proper fix.

Is the optional import org.codehaus.commons.compiler problematic (https://github.com/qos-ch/logback/blob/1a1985d4095614c44e40bf5be981838a67ac4ca2/logback-core/pom.xml#L140)? Which bundle does export that?

@eric-milles
Copy link
Member

It is possible to keep the m2e - slf4j over logback logging feature and use Groovy as well. You just need to drop the compiler versions you are not using so there is no bundle refresh at startup. I could help you with this if it is not obvious how to set up.

The logback bundle has optional support for Groovy config and this leads to a number of optional packages in the bundle manifest. I tried multiple strategies for breaking the optional linkage. p2 (eclipse provisioning) metadata is applied at build time, so the linkage was made regardless of my changes in p2 land.

It may be possible to implement the m2e console with something other than logback. That would be a change in m2e, not groovy-eclipse.

Whatever the change was between 4.18 and 4.19 in the bundle classloader could be investigated and mitigated. I got a change in for "invalid registry object" and it was quite an effort to get buy in from core eclipse developers. So I am happy to be able to put this issue aside again with the logback restriction during installation.

@kwin
Copy link

kwin commented Jun 22, 2021

It is possible to keep the m2e - slf4j over logback logging feature and use Groovy as well. You just need to drop the compiler versions you are not using so there is no bundle refresh at startup.

I use Oomph for setting up a custom Eclipse distribution. Which feature should I use to prevent the conflict in case I make sure to install only one compiler? To me it seems that plugin https://github.com/groovy/groovy-eclipse/blob/master/base/org.codehaus.groovy.eclipse.compilerResolver/META-INF/p2.inf defines the incompatibility with logback classic but it seems it is included in the necessary features...

@eric-milles
Copy link
Member

I'm not sure how Oomph deals with this kind of conflict. You may need to make some inquiries over there. As you noted, what we have done here is indicate the incompatibility with the logback-classic bundle. If that bundle is installed anyways, we are compatible as long as there is no compiler switching (aka bundle refresh). You can prevent compiler switching by installing only one Groovy Compiler revision.

And if you could get the m2e group to support the console you referenced without logback-classic or build a version of logback-classic without the groovy package imports then compatibility would be restored.

@eric-milles
Copy link
Member

eric-milles commented Jul 6, 2021

Another angle you could take is to exclude the compiler switcher (org.codehaus.groovy.eclipse.compilerResolver) bundle from your installation. This is the bundle that declares itself incompatible with logback-classic. If it is excluded, p2 will happily allow m2e logging, PMD, etc.

Update: this bundle is currently imported by a core bundle. It would need to be decoupled before it can be made optional.

https://github.com/groovy/groovy-eclipse/blob/master/base/org.codehaus.groovy.eclipse.compilerResolver/META-INF/p2.inf

@eric-milles eric-milles added the bug label Aug 9, 2021
@eric-milles eric-milles added this to the v4.2.0 milestone Aug 9, 2021
@eric-milles eric-milles self-assigned this Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants