문제

I've installed the Websphere Development tools in STS 3.3.0 (Juno 3.8.2 version) as well as the m2e wtp connectors. I'm now having issues with building in Maven. I'm getting the following exception when updating the Project using maven.

java.lang.NoClassDefFoundError: org.eclipse.m2e.wtp.WTPProjectsUtil
at com.ibm.etools.maven.javaee.core.configurators.Utils.isJPAProject(Utils.java:43)
at com.ibm.etools.maven.javaee.core.configurators.JPAProjectConfiguratorDelegate.configureProject(JPAProjectConfiguratorDelegate.java:46)
at com.ibm.etools.maven.javaee.core.configurators.JPAProjectConfigurator.configure(JPAProjectConfigurator.java:45)
at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:109)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:472)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:465)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration0(ProjectConfigurationManager.java:403)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:316)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:89)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1301)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:313)
at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:77)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

However when I look in the plugins directory I can see the jar file org.eclipse.m2e.wtp_1.0.0.20130613-0136.jar which contains the class in question. How do I work out what the eclipse classpath is and is there a way to add this library to the classpath?

도움이 되었습니까?

해결책 2

It turned out that I was using the wrong version of Juno and should have been using Juno 4.2. Once that was installed along with Websphere 8.5.5 plugin I just needed to update the m2e WTP plugin to the latest 1.x.x plugin.

다른 팁

This answer is a temporary fix / hack.


Same problem for me since WDT upgrade :

  • "Web Development Tools" version 8.5.1002.v20130402_2058
  • with "m2e-wtp" version 1.0.0.20130613-0136

Root cause : Versioning rules for plugins dependencies

Solution :

Open file eclipse\plugins\com.ibm.etools.maven.javaee.core_1.0.0.v20121205_2240.jar Edit META-INF\MANIFEST.MF

Change in Require-Bundle section

org.eclipse.m2e.wtp;bundle-version="[0.16.0,1.0.0)"

By

org.eclipse.m2e.wtp;bundle-version="[0.16.0,2.0.0)"

Or something like that greater than 1.0.0.xx ... and without change number of characters in column

Save file, jar and restart Eclipse with -clean option.


m2e v1.0.0 and wdt 8.5.1 (not 002) were working fine, but com.ibm.etools.maven.javaee.core-xx.jar was not in this version ... so the only sustainable solution is a WDT update (dependencies range upgrade), perhaps in v8.5.1003.

It took me a long time to figure out the issue. What I did to fix the issue was, I uninstall the maven juno integration plug in and install the other maven plug in(m2e-wtp) and that did the trick and I am back on my eclipse workspace without any issues. Hope this will help.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top