How to fix error "Validating org/eclipse/m2e/wtp/MavenWtpPlugin" - eclipse

I have Eclipse (Juno SR2) with both M2E (1.3), M2E-WTP (0.17) and WebSphere Dev Tools for v.8. The problem started after Websphere Dev tools installation. It says in error dialog : "Validating" "org/eclipse/m2e/wtp/MavenWtpPlugin".
In Eclipse logs it turned out to be NoClassDefFoundError
!MESSAGE An internal error occurred during: "Validating <module name here>".
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/m2e/wtp/MavenWtpPlugin
Does anyone had some luck in solving this issue?
Thanks!

The missing class is in fact there, plugin org.eclipse.m2e.wtp. Started to dig in the IBM WAS Dev Tools.
The problem originates from com.ibm.etools.maven.javaee.core plugin.
Checked MANIFEST.MF under \plugins\com.ibm.etools.maven.javaee.core_1.1.0.v20130522_1924\ and it turned out there is some strange version range bundle dependency on org.eclipse.m2e.wtp;bundle-version="[1.0.0,2.0.0)";resolution:=optional. The plugin org.eclipse.m2e.wtp version is not even close to version 1.0.0 and resolution is optional, so made some changes to conform the bundle resolution:
...,org.eclipse.m2e.wtp;bundle-version="[0.1.0,2.0.0)";resolution:=optional,...
Started Eclipse with -clean argument, and refreshed all Maven projects in the workspace.
This seems to do the trick for me. You may still get
"Updating Maven Project". Unsupported IClasspathEntry kind=4
but there is a fix for this already here "Updating Maven Project". Unsupported IClasspathEntry kind=4

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.

Grails 2.5.5 in Eclipse with Groovy Compiler 2.4.12 throws Refresh Dependencies error

I have installed Grails 2.5.5 in Eclipse GGTS (3.6.4.RELEASE) and have added Groovy Compiler feature 2.4.12. I am importing existing projects into the workspace.
Before updating the compiler, refresh dependencies (on a new project) worked without problems. Now, when I run Refresh Dependencies (alt+g,r), it throws an error. I am looking for guidance to help resolve the issue. The log shows the following
!ENTRY org.grails.ide.eclipse.core 4 0 2017-07-25 18:43:19.426
!MESSAGE Refresh dependecies failed
!STACK 0
java.lang.NoClassDefFoundError: org/codehaus/groovy/frameworkadapter/util/SpecifiedVersion
at org.grails.ide.eclipse.commands.GroovyCompilerVersionCheck.getRequiredGroovyVersion(GroovyCompilerVersionCheck.java:63)
at org.grails.ide.eclipse.commands.GroovyCompilerVersionCheck.getRequiredGroovyVersion(GroovyCompilerVersionCheck.java:57)
at org.grails.ide.eclipse.commands.GroovyCompilerVersionCheck.check(GroovyCompilerVersionCheck.java:50)
at org.grails.ide.eclipse.commands.GrailsCommandUtils.refreshDependencies(GrailsCommandUtils.java:327)
at org.grails.ide.eclipse.core.internal.classpath.GrailsClasspathContainerUpdateJob.runInWorkspace(GrailsClasspathContainerUpdateJob.java:89)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Background
This is an issue present in a specific version of the groovy-eclipse plugin. As far as I know the issue is present in groovy-eclipse v2.9.2.xx-201707260047-e44 (groovy compiler v2.4.12).
Since then the issue has ben reported and fixed.
Solution
To solve the problem simply update the groovy-eclipse plugin to v2.9.2.xx-201707311844-e44 or newer:
In the Help menu select Install New Software
Select or add the source http://dist.springsource.org/snapshot/GRECLIPSE/e4.4/ in the Work with field
In the Groovy Compilers category select the Groovy Compiler 2.4 item
Clic Next and proceed with the update
Restart GGTS to apply the changes

Eclipse Neon cannot start a java debug session

I'm using Eclipse Neon from the release date. Yesterday I got some strange errors in Eclipse and after a reboot of the Eclipse instance everything was gone. I installed Eclipse and my plugins again. Everything is working again but when I launch the Java debugger on one of my project I got the error:
An internal error occurred during: "XXXX".
java.lang.NullPointerException
This error occurs on debugging all my projects also in another workspace. Can someone help me with this? The error is not explaining what the exact problem is.
In the logfile of Eclipse I can found the follow error:
java.lang.NullPointerException
at org.eclipse.jdi.Bootstrap.virtualMachineManager(Bootstrap.java:36)
at org.eclipse.jdt.internal.launching.StandardVMDebugger.getConnector(StandardVMDebugger.java:560)
at org.eclipse.jdt.internal.launching.StandardVMDebugger.run(StandardVMDebugger.java:246)
at org.eclipse.pde.launching.AbstractPDELaunchConfiguration.launch(AbstractPDELaunchConfiguration.java:79)
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:55)
I fully removed my previous Eclipse environment. Settings included.
Installed Eclipse environment from a clean install and installed all my plugins again. The problem was fixed.

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

Eclipse Jetty Issue: WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext - java.util.zip.ZipException: invalid code lengths set

Eclipse with run-jetty-run suddenly starts to fail with the message:
2014-05-09 13:31:08.360:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,[file:~/api-public/src/main/webapp/]}
java.util.zip.ZipException: invalid code lengths set
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:193)
at java.util.jar.JarInputStream.read(JarInputStream.java:207)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:139)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:117)
at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:142)
at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:179)
at org.eclipse.jetty.webapp.JarScanner.matched(JarScanner.java:156)
at org.eclipse.jetty.util.PatternMatcher.matchPatterns(PatternMatcher.java:82)
at org.eclipse.jetty.util.PatternMatcher.match(PatternMatcher.java:64)
at org.eclipse.jetty.webapp.JarScanner.scan(JarScanner.java:78)
at org.eclipse.jetty.webapp.MetaInfConfiguration.preConfigure(MetaInfConfiguration.java:78)
at runjettyrun.webapp.RJRMetaInfoConfiguration.preConfigure(RJRMetaInfoConfiguration.java:14)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:417)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:453)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:263)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at runjettyrun.Bootstrap.main(Bootstrap.java:80)
Things done to try to fix:
Delete de workspace and regenerate
Reinstall eclipse
Reimport the maven project
Eclipse Kepler SR2 + run-jetty-run
Quite weird.
I changed the run-jetty server version from 8 to 7 and the error changed to a maven library dependency.
I deleted this library from my local maven repository (.m2/repositories/...), reinstalled and now is working perfectly.