Bug 912733 - m2eclipse does not work with latest eclipse (xml problem?)
Summary: m2eclipse does not work with latest eclipse (xml problem?)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Krzysztof Daniel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-19 14:32 UTC by Severin Gehwolf
Modified: 2014-01-13 00:27 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-02-20 10:06:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
error pop-up with details. (60.74 KB, image/png)
2013-02-19 14:33 UTC, Severin Gehwolf
no flags Details

Description Severin Gehwolf 2013-02-19 14:32:17 UTC
Description of problem:
If someone installs m2eclipse into a yum installed eclipse via p2 and tries to import a maven project afterwards, m2's pom resolver seems to throw up.

Version-Release number of selected component (if applicable):
eclipse-platform-4.2.2-0.1.git20121217.fc18.x86_64

How reproducible:
Always. With a clean ~/.eclipse too.

Steps to Reproduce:
1. hg clone http://icedtea.classpath.org/hg/thermostat
2. eclipse -data remove_me
3. Install m2eclipse from the existing juno update site
4. restart eclipse
5. File => Import => Existing Maven Project
6. Select the "thermostat" folder as "root"
7. Select any one artifact to import.
8. The last step will bring up an error dialog as in the attached screenshot.
  
Actual results:
Import existing maven project causes error.

Expected results:
pom.xml file can be opened with the Maven XML editor and artefacts get properly resolved.

Additional info:
This worked fine with F17's eclipse + upstream m2eclipse.

I'm seeing this in the error log. Could be another xerxesj/xalanj problem?:

java.lang.LinkageError: loader constraint violation: when resolving interface method "org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument.getDocumentElement()Lorg/w3c/dom/Element;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/m2e/editor/xml/internal/MarkerLocationService, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, org/eclipse/wst/xml/core/internal/provisional/document/IDOMDocument, have different Class objects for the type l.provisional.document.IDOMDocument.getDocumentElement()Lorg/w3c/dom/Element; used in the signature
	at org.eclipse.m2e.editor.xml.internal.MarkerLocationService.checkVarious(MarkerLocationService.java:553)
	at org.eclipse.m2e.editor.xml.internal.MarkerLocationService.addEditorHintMarkers(MarkerLocationService.java:235)
	at org.eclipse.m2e.core.internal.markers.MarkerUtils.addEditorHintMarkers(MarkerUtils.java:61)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.readMavenProject(ProjectRegistryManager.java:645)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:368)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:328)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:279)
	at org.eclipse.m2e.core.internal.project.registry.MavenProjectManager.refresh(MavenProjectManager.java:58)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:87)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

Comment 1 Severin Gehwolf 2013-02-19 14:33:27 UTC
Created attachment 699471 [details]
error pop-up with details.

Comment 2 Krzysztof Daniel 2013-02-19 15:37:20 UTC
Yes, this definitely looks like the xerces issue. Do you have eclipse-dtp installed?

Comment 3 Severin Gehwolf 2013-02-19 15:39:15 UTC
$ rpm -q eclipse-dtp
package eclipse-dtp is not installed

Comment 4 Krzysztof Daniel 2013-02-19 17:03:03 UTC
Could you try to install it and check if it works?

Comment 5 Severin Gehwolf 2013-02-19 17:59:00 UTC
(In reply to comment #4)
> Could you try to install it and check if it works?

With eclipse-dtp installed it seems to work.

Comment 6 Krzysztof Daniel 2013-02-20 08:48:30 UTC
Then I'm afraid there is nothing I can do.

The issue is caused by the fact that in Fedora Eclipse we rely on packages provided by VM and don't have all the bundles upstream has. 

The problem appears when a P2 installed feature provides a bundle that is also present in the Fedora VM. Since each bundles has a separate classloader, identical classes from different sources are considered to be different.

The only way to get it solved is to install universal provider (in this case xerces-j2), which fixes the issue.

The ultimate way of solving the problem is packaging m2e or making it require the package instead of providing it's own.

Comment 7 Severin Gehwolf 2013-02-20 10:06:09 UTC
(In reply to comment #6)
> The ultimate way of solving the problem is packaging m2e or making it
> require the package instead of providing it's own.

As it turns out it *is* packaged (for F18+).

$ sudo yum install eclipse-m2e-core

does the trick. See bug 847160. Thanks for your help, Chris!

I'll close this as won't fix, since users should used the packaged plug-in.


Note You need to log in before you can comment on or make changes to this bug.