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)
Created attachment 699471 [details] error pop-up with details.
Yes, this definitely looks like the xerces issue. Do you have eclipse-dtp installed?
$ rpm -q eclipse-dtp package eclipse-dtp is not installed
Could you try to install it and check if it works?
(In reply to comment #4) > Could you try to install it and check if it works? With eclipse-dtp installed it seems to work.
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.
(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.