I have a project with sub-projects (https://github.com/i23098/Collections) that compiles correctly on the command-line. When I try to import the project in Eclipse I get an error and tells me to check the log... Checking it, it has:
!ENTRY org.springsource.ide.eclipse.gradle.core 4 0 2014-11-09 17:03:13.404
!MESSAGE Gradle project hierarchy is inconsistent for '/home/ralmeida/workspace-collections/Collections'
!STACK 0
java.lang.reflect.InvocationTargetException
at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:113)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.springsource.ide.eclipse.gradle.core.InconsistenProjectHierarchyException: Gradle project hierarchy is inconsistent for '/home/ralmeida/workspace-collections/Collections'
at org.springsource.ide.eclipse.gradle.core.util.ExceptionUtil.inconsistentProjectHierachy(ExceptionUtil.java:82)
at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.getCachedModel(GradleModelProvider.java:339)
at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:634)
at org.springsource.ide.eclipse.gradle.core.GradleProject.getSkeletalGradleModel(GradleProject.java:653)
at org.springsource.ide.eclipse.gradle.ui.wizards.GradleImportWizardPageOne$11.doit(GradleImportWizardPageOne.java:516)
at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:105)
... 1 more
Root exception:
org.springsource.ide.eclipse.gradle.core.InconsistenProjectHierarchyException: Gradle project hierarchy is inconsistent for '/home/ralmeida/workspace-collections/Collections'
at org.springsource.ide.eclipse.gradle.core.util.ExceptionUtil.inconsistentProjectHierachy(ExceptionUtil.java:82)
at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.getCachedModel(GradleModelProvider.java:339)
at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:634)
at org.springsource.ide.eclipse.gradle.core.GradleProject.getSkeletalGradleModel(GradleProject.java:653)
at org.springsource.ide.eclipse.gradle.ui.wizards.GradleImportWizardPageOne$11.doit(GradleImportWizardPageOne.java:516)
at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:105)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Eclipse IDE for Java EE Developers 4.4.1.20140925-1820
Gradle IDE 3.6.2.201410090835-RELEASE (configured to use gradle wrapper at http://services.gradle.org/distributions/gradle-2.1-bin.zip)
Any ideas?
I just spontaneously ran into this problem myself with a working project. After a bit of investigation, I found that an incorrect value was written into file:
projectDir/.settings/gradle/org.springsource.ide.eclipse.gradle.core.prefs
for the key:
org.springsource.ide.eclipse.gradle.rootprojectloc=
I found simply deleting the bogus value corrected the problem in my case
Related
I'm having various Gradle problems after a new clean Eclipse install.
They seem to be associated w/ this "Problem" message:
Could not run phased build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.1.1-bin.zip'.
Initialization script 'Z:\eclipse-workspace\.metadata\.plugins\org.eclipse.buildship.core\init.d\eclipsePlugin.gradle'
Could not compile initialization script 'Z:\eclipse-workspace\.metadata\.plugins\org.eclipse.buildship.core\init.d\eclipsePlugin.gradle'.
startup failed:
General error during semantic analysis: Unsupported class file major version 60
java.lang.IllegalArgumentException: Unsupported class file major version 60
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196)
.....
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:831)
1 error
I've already tried deleting .gradle & "Gradle->Refresh Gradle Project".
I've also tried this:
stackoverflow
My Java install is clean:
java version "16.0.1" 2021-04-20
& confirmed Eclipse is pointing to it ("Preferences->Java->Installed JREs").
Installation details:
Buildship: Eclipse Plug-ins for Gradle 3.1.5.v20210113-0929
Eclipse IDE for Java Developers 4.20.0.20210612-1200
Windows 10.
Eclipse Install Err Log:
!ENTRY org.eclipse.buildship.core 2 2 2021-07-09 11:22:05.951
!MESSAGE Initialize project testgradleprj failed due to an error in the referenced Gradle build.
!STACK 0
org.gradle.tooling.BuildException: Could not execute build using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.1.1-bin.zip'.
Gradle 6.8 does not work with Java 16.
Java 16 supported starting with Gradle 7
"In previous Gradle versions, running Gradle itself on Java 16 resulted in an error."
https://docs.gradle.org/7.0/release-notes.html#java-16
Thanks to LMC. I changed the project prefs->Gradle from Wrapper to Specific=7.1.1 :
I have updated my gradle-warpper.properties file with
distributionUrl=https://services.gradle.org/distributions/gradle-6.4.1-bin.zip
from
distributionUrl=https://services.gradle.org/distributions/gradle-5.6.2-bin.zip
and refresh the gradlew project in eclipse. It's build successfull
Note : Java 11 version is installed in my machine
Change your gradle.properties file
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
And build.gradle file
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
}
In my case, it was because Eclipse was running upon a JVM that was different from the one used by my local Gradle.
I edited the eclipse.ini file so that Eclipse would run on the same JVM as my local Gradle (i.e. the one pointed by JAVA_HOME) and it worked!
After starting Eclipe I see the following error message in the workspace/.metadata/.log
!ENTRY org.eclipse.core.runtime 4 0 2017-09-18 09:38:48.275
!MESSAGE Invalid input url:platform:/plugin/com.mountainminds.eclemma.ui/icons/full/eview16/coverage.gif
!STACK 0
java.io.IOException: Unable to resolve plug-in "platform:/plugin/com.mountainminds.eclemma.ui/icons/full/eview16/coverage.gif".
The message does not go away even after uninstalling or reinstalling the plugin.
Any ideas on how to resolve this?
Eclipse: Oxygen 4.7.0
EclEmma: 3.0.0
EclEmma became an Eclipse project and is now part of the Eclipse Java download packages. Due to the move, the plug-ins have been rename: com.mountainminds.eclemma.ui become org.eclipse.eclemma.ui.
If you use a workspace that have been used with EclEmma < 3.0.0 before,
start Eclipse with the option -clean and
reset all Java perspectives (coverage.gif is the icon of the Coverage view and could be referenced in the stored window/perspective layout).
This is the image the error is referring to.
Put it in the proper installation path on your machine and you'd be fine.
When using the Eclipse Jetty plugin (http://marketplace.eclipse.org/content/eclipse-jetty?mpc=true&mpc_state=), I started to get the following error:
An internal error occurred during: "Launching myProject".
Unknown scope: test,provided
This started to occur for two separate projects, both on Windows and MacOs X systems. Note that a regular Jetty deployment, as well as the Jetty runner Maven plugin, work like a charm, the problem seems to be with the Eclipse plugin only. The problem persists after upgrading the plugin to the newest version. Changing Jetty versions doesn't help as well.
edit: Thanks for the tips so far. The question is what might be the source of this problem and how to get rid of it. The relevant log message is as follows:
!ENTRY org.eclipse.core.jobs 4 2 2016-04-27 09:01:40.914
!MESSAGE An internal error occurred during: "Launching myProject".
!STACK 0
java.lang.IllegalArgumentException: Unknown scope: test,provided
at net.sourceforge.eclipsejetty.util.MavenScope.to(MavenScope.java:109)
at net.sourceforge.eclipsejetty.util.MavenDependencyInfo.create(MavenDependencyInfo.java:98)
at net.sourceforge.eclipsejetty.util.MavenDependencyInfoMap.resolve(MavenDependencyInfoMap.java:141)
at net.sourceforge.eclipsejetty.util.Dependency.create(Dependency.java:39)
at net.sourceforge.eclipsejetty.launch.util.JettyLaunchConfigurationDelegate.getOriginalClasspathEntries(JettyLaunchConfigurationDelegate.java:340)
at net.sourceforge.eclipsejetty.launch.util.JettyLaunchConfigurationDelegate.createJettyConfigurationFile(JettyLaunchConfigurationDelegate.java:791)
at net.sourceforge.eclipsejetty.launch.util.JettyLaunchConfigurationDelegate.getVMArguments(JettyLaunchConfigurationDelegate.java:217)
at org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:64)
at net.sourceforge.eclipsejetty.launch.util.JettyLaunchConfigurationDelegate.launch(JettyLaunchConfigurationDelegate.java:192)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Try running Eclipse with a console and debug info to see if more error details are available: add -console, -consoleLog and -debug to your eclipse.ini to achieve this.
Try using the Run Jetty Run plugin instead of the Maven Jetty plugin
All of a sudden I am getting errors in my eclipse grails project (GGTS 3.6.4). I'm wondering if this might be due to codehaus being terminated...
!ENTRY org.eclipse.jdt.core 4 4 2015-06-07 07:47:09.622
!MESSAGE Internal groovy compiler error.
!STACK 0
BUG! exception in phase 'semantic analysis' in source unit '/Users/paul/Documents/GrailsWorkspace/Invoicer/target/work/plugins/fields-1.5.1/grails-app/taglib/grails/plugin/formfields/FormFieldsTagLib.groovy' commencingResolution failed: declaration found, but unexpectedly found no scope for grails.plugin.formfields.FormFieldsTagLib$BeanAndPrefix
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:1027)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:648)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:597)
at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.processToPhase(GroovyCompilationUnitDeclaration.java:202)
at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.resolve(GroovyCompilationUnitDeclaration.java:2202)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:827)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.codehaus.jdt.groovy.internal.compiler.ast.GroovyEclipseBug: commencingResolution failed: declaration found, but unexpectedly found no scope for grails.plugin.formfields.FormFieldsTagLib$BeanAndPrefix
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.commencingResolution(JDTResolver.java:511)
at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1283)
at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:167)
at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.startResolving(JDTResolver.java:565)
at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:714)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:1018)
... 7 more
I have tried refreshing dependencies as well as removing target and target-eclipse directories.
It seems that Eclipse just lost its mind. I deleted the project then re-imported it. Eclipse told me that it looked like a Grails project but needed to recreate the project file. I allowed it to do so and now it works fine.
got same error (just using Groovy btw) and a project clean did the trick
This morning, I'm not able do run Eclipse Indigo whereas yesterday it was working.
I receive this message :
An error has occured. See the log file E:\workspaces\sim.metadata.log
And my .log file displays :
!STACK 0
!MESSAGE An error occurred while automatically activating bundle org.eclipse.core.resources (103).
...
Caused by: java.lang.ClassFormatError: Illegal constant pool index 7436 for method signature in class file org/eclipse/core/internal/resources/MarkerManager
...
!STACK 1
java.lang.NoClassDefFoundError: org/eclipse/core/resources/IContainer
...
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.core.resources (103).
...
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.core.resources.ResourcesPlugin.start() of bundle org.eclipse.core.resources.
I ran Eclipse with the clean argument but it's the same.
Thanks for any help
It looks like your eclipse crashed sometime before and is unable to restore the workspace.
You can delete .metadata/.plugins/org.eclipse.core.resources/.snap .
Or
Try using a new workspace. Change the settings in \configuration.settings\org.eclipse.ui.ide.prefs and set SHOW_WORKSPACE_SELECTION_DIALOG to true
After that import all your projects to your workspace.
Try reinstalling Eclipse. The message regarding an illegal constant pool index sounds like a broken .class file. Your settings and workspace should remain intact, but you may need to re-install your plugins (if any).
I suppose you still have your workspace intact.The best and fastest option would be to reinstall eclipse and replace the new workspace with the older one.