Eclipse error processing file (commencingResolution failed) - eclipse

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

Related

Eclemma: Invalid Input Url Error in Eclipse

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.

Internal error for Jetty plugin in Eclipse

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

InconsistenProjectHierarchyException

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

Cannot run Eclipse

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.

I'm getting a noclassdeffounderror when trying to generate pojos or mapping with hibernate tools

I'm trying to generate pojos from my database but I get the following error(s) on eclipse indigo 3.7.2 with hibernate tools 3.4 plugin installed and hibernate 3.6.10 libraries (they seem to be all) in my build path
SHORT VERSION :
org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class
Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class
java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository
Could not initialize class org.hibernate.cfg.reveng.OverrideRepository
java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository
Could not initialize class org.hibernate.cfg.reveng.OverrideRepository
MY jars from the project buildpath are ( in order if that matters):
hibernate-distribution-3.6.10.Final\hibernate3.jar
hibernate-distribution-3.6.10.Final\lib\required\antlr-2.7.6.jar
hibernate-distribution-3.6.10.Final\lib\required\commons-collections-3.1.jar
hibernate-distribution-3.6.10.Final\lib\required\dom4j-1.6.1.jar
hibernate-distribution-3.6.10.Final\lib\required\javassist-3.12.0.GA.jar
hibernate-distribution-3.6.10.Final\lib\required\jta-1.1.jar
hibernate-distribution-3.6.10.Final\lib\required\slf4j-api-1.6.1.jar
postgresql-9.0-802.jdbc3.jar
I noticed that hibernate tools plugin has a few older jars in its plugins folder BTW( slf4j for example being version 1.5.8)
In the meantime I will try buddyloading
NORMAL STACKTRACE
ENTRY org.hibernate.eclipse.console 4 666 2012-06-25 04:23:55.946
!MESSAGE org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class
!STACK 0
org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.launchExporters(ConsoleExtension3_6.java:149)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:270)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6$3.execute(ConsoleExtension3_6.java:249)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.jboss.tools.hibernate3_6.HibernateExtension3_6.execute(HibernateExtension3_6.java:201)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.buildConfiguration(ConsoleExtension3_6.java:239)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.runExporters(ConsoleExtension3_6.java:169)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.launchExporters(ConsoleExtension3_6.java:126)
... 6 more
!SUBENTRY 1 org.hibernate.eclipse.console 4 666 2012-06-25 04:23:55.946
!MESSAGE org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class
!STACK 0
org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.launchExporters(ConsoleExtension3_6.java:149)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:270)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6$3.execute(ConsoleExtension3_6.java:249)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.jboss.tools.hibernate3_6.HibernateExtension3_6.execute(HibernateExtension3_6.java:201)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.buildConfiguration(ConsoleExtension3_6.java:239)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.runExporters(ConsoleExtension3_6.java:169)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.launchExporters(ConsoleExtension3_6.java:126)
... 6 more
!SUBENTRY 1 org.hibernate.eclipse.console 4 666 2012-06-25 04:23:55.946
!MESSAGE java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository
!STACK 0
java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.reveng.OverrideRepository
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6$3.execute(ConsoleExtension3_6.java:249)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.jboss.tools.hibernate3_6.HibernateExtension3_6.execute(HibernateExtension3_6.java:201)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.buildConfiguration(ConsoleExtension3_6.java:239)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.runExporters(ConsoleExtension3_6.java:169)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.launchExporters(ConsoleExtension3_6.java:126)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:270)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The first time i tried to use code generation i got something like this :
org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class java.lang.NoClassDefFoundError: org/objectweb/asm/Type org/objectweb/asm/Type
java.lang.NoClassDefFoundError: org/objectweb/asm/Type org/objectweb/asm/Type
java.lang.ClassNotFoundException: org.objectweb.asm.Type org.objectweb.asm.Type
After that i got only the [...]cfg.reveng.OverrideRepository error.
After badly suffering with NoclassDefFoundError for Hours, I finally found the solution.
Main focus: The libraries of hibernate version should match with selected Hibernate version of console configuration(point 3).
Check List:
Make sure you have downloaded latest version of Hibernate Plugin (That suits your eclipse's version). For getting it go to Help->Eclipse Marketplace-> type: hibernate (eclipse version name e.g. luna). Select Latest JBoss Tools and for minimum functionality select Hibernate and JBoss Maven Hibernate Configurator.
Download latest jar files from http://hibernate.org/orm/downloads/. Store those files in folder that is there in your build path.
When creating Hibernate console configuration make sure you select latest Hibernate Version from drop down. e.g. In my case as I had Hibernate 4.x jar file in build path, choosing version 4.3. solved problem.
Try changing Hibernate versions from drop down list of console configuration. It may fix the problem.
Correct answer: https://community.jboss.org/thread/201634?tstart=0
If anyone has anything to add please take the time and do it, as i have.
Thanks
And BTW i can't believe anybody in the community ever encountered this error/ problem
I also faced this issue while working on hibernate reverse engineering and I suffered almost 3 days, but I finally got the solution.
In order to work on the hibernate reverse engineering you don't need to add any hibernate related jar explicitly because it comes along with the hibernate tools plugins, only the thing is you have to add the jdbc jar for the corresponding Database.
After creating the project you are selecting hibernate option in the perspective of eclipse then you will select File => New =>Hibernate Console Configuration
Here you have to do hibernate console configuration in that you have "Hibernate Version" make sure what ever version you have selected here the same you have to select while creating the Hibernate Configuration File which is nothing but hibernate.cfg.xml if you will do the same you won't get this error:
org.hibernate.console.HibernateConsoleRuntimeException: Received a NoClassDefFoundError, probably the console configuration classpath is incomplete or contains conflicting versions of the same class