Bug 710815

Summary: Android plugin does not work correctly even if installed; org/w3c/dom/ElementTraversal not found
Product: [Fedora] Fedora Reporter: Andy Tai <atai>
Component: eclipseAssignee: Krzysztof Daniel <kdaniel>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 15CC: abdel.g.martinez.l, akurtako, antti.andreimann, ebaron, fedora.9076, gerard, germano.massullo, iyke46742000, jeanclaude.magras, kdaniel, k.georgiou, marcin.rzeznicki, maurizio.antillon, mbenitez, nitind, patrickm, paulo.fidalgo.pt, samuel-rhbugs, sgehwolf, tetracon, walovaton, zombie.dr, zx
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: xerces-j2-2.11.0-7.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-06 00:55:35 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 872806    
Attachments:
Description Flags
A source of the fix
none
Fix proposition
none
Fix created by git format-patch
none
git format-patch - re-add javax.xml & system.bundle
none
Comment none

Description Andy Tai 2011-06-04 20:23:26 EDT
Description of problem:

On a new Fedora 15 x86-64 installation, with the Fedora 15 Eclipse installed, run
Eclipse.  Install the Android SDK and Eclipse plugin per Google's standard instructions.  Then everything seems to work.  

Create a simple hello project, per the standard Android documentation per Google.
Trying to build projects won't work; the project build function is broken.

In addition, when you restart Eclipse Eclipse will generate error messages.  the error log shows messages similar to 

java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
	at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
	at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
	at com.android.ide.common.resources.platform.AttrsXmlParser.getDocument(AttrsXmlParser.java:216)
	at com.android.ide.common.resources.platform.AttrsXmlParser.preload(AttrsXmlParser.java:132)
	at com.android.ide.eclipse.adt.internal.sdk.AndroidTargetParser.run(AndroidTargetParser.java:141)
	at com.android.ide.eclipse.adt.internal.sdk.Sdk$5.run(Sdk.java:480)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)


so the key issue is that in the Fedora 15 Eclipse, the package org.w3c.dom.ElementTraversal is not implemented by all the standard packages included in the Fedora Eclipse.

Version-Release number of selected component (if applicable):

Fedora 15 Eclipse (which is 3.6.2, Helios)
Eclipse Platform

Version: 3.6.2
Build id: M20110210-1200

How reproducible:

always

Steps to Reproduce:
1. After installing the Android plguin, restart Eclipse
2. Creating a simple Android project, and try to build it. Eclipse shows errors parsing some data, or such, 
3. Go deeper into the error log and you see basically the ElementTraversal class not found
  
Actual results:

as above

Expected results:

The EleemntTraversal class is found and does not cause these problems
Additional info:
Comment 1 Andy Tai 2011-06-05 04:00:49 EDT
I installed the stock Eclipse (64-bit Linux) bundle from eclipse.org on the same system and then install the Android plugin, and it works.

By the way, the only JDK on this system is

jre-1.6.0-openjdk.x86_64
Comment 2 Andrew Overholt 2011-06-06 09:15:18 EDT
This name seems odd:  jre-1.6.0-openjdk.x86_64 ... where does it come from?

I see org.w3c.dom.ElementTraversal in a few JARs in /usr/share/java provided by two packages:  batik and xml-commons-apis.  It seems like the Android plugins are relying on a bundled JAR somewhere that Fedora has stripped out.  Alex, do you have any idea what's going on here?

Googling for com.android.ide.common.resources.platform.AttrsXmlParser.getDocument I get [1] which shows:

            /**
             * Creates an XML document from the attrs.xml OS path.
             * May return null if the file doesn't exist or cannot be parsed.
             */
            private Document getDocument() {
                if (mDocument == null) {
                    DocumentBuilderFactory factory = DocumentBuilderFactory
                            .newInstance();
                    factory.setIgnoringComments(false);
                    try {
                        DocumentBuilder builder = factory.newDocumentBuilder();
                        mDocument = builder.parse(new File(mOsAttrsXmlPath));
                    } catch (ParserConfigurationException e) {
                        mLog
                                .error(
                                        e,
                                        "Failed to create XML document builder for %1$s", //$NON-NLS-1$
                                        mOsAttrsXmlPath);
                    } catch (SAXException e) {
                        mLog.error(e, "Failed to parse XML document %1$s", //$NON-NLS-1$
                                mOsAttrsXmlPath);
                    } catch (IOException e) {
                        mLog.error(e, "Failed to read XML document %1$s", //$NON-NLS-1$
                                mOsAttrsXmlPath);
                    }
                }
                return mDocument;
            }

[1]
http://www.java2s.com/Open-Source/Android/android-core/platform-sdk/com/android/ide/common/resources/platform/AttrsXmlParser.java.htm
Comment 3 Pedro Matiello 2011-07-03 10:30:49 EDT
I have the same problem with the WTP plugin. Again, the ElementTraversal interface cannot be found by Eclipse, although it's available in jars located at /usr/share/java. The problem arises when I try to edit a JSP file — instead of the expected editor, I get the following error:

java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
	at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
	at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache.fetchDescriptor(DeploymentDescriptorPropertyCache.java:750)
	at org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache.getCachedDescriptor(DeploymentDescriptorPropertyCache.java:812)
	at org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache.getPropertyGroups(DeploymentDescriptorPropertyCache.java:873)
	at org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager.handlePreludes(TLDCMDocumentManager.java:966)
	at org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.nodeParsed(TLDCMDocumentManager.java:188)
	at org.eclipse.wst.xml.core.internal.parser.XMLSourceParser.fireNodeParsed(XMLSourceParser.java:135)
	at org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser.parseNodes(JSPSourceParser.java:296)
	at org.eclipse.wst.xml.core.internal.parser.XMLSourceParser.getDocumentRegions(XMLSourceParser.java:173)
	at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser._core_reparse_text(StructuredDocumentReParser.java:310)
	at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.core_reparse(StructuredDocumentReParser.java:710)
	at org.eclipse.jst.jsp.core.internal.parser.JSPReParser.reparse(JSPReParser.java:153)
	at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.reparse(StructuredDocumentReParser.java:1291)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.updateModel(BasicStructuredDocument.java:2709)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.internalReplaceText(BasicStructuredDocument.java:1923)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2419)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.set(BasicStructuredDocument.java:2931)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.setDocumentContent(ResourceTextFileBuffer.java:575)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.initializeFileBufferContent(ResourceTextFileBuffer.java:286)
	at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.create(ResourceFileBuffer.java:245)
	at org.eclipse.core.internal.filebuffers.TextFileBufferManager.connect(TextFileBufferManager.java:112)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.createFileInfo(TextFileDocumentProvider.java:559)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:478)
	at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4056)
	at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:217)
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1444)
	at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:169)
	at org.eclipse.wst.sse.ui.StructuredTextEditor.doSetInput(StructuredTextEditor.java:1908)
	at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3043)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606)
	at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3061)
	at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3088)
	at org.eclipse.wst.sse.ui.StructuredTextEditor.init(StructuredTextEditor.java:2553)
	at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
	... 120 more

This happens with Fedora-packaged Eclipse on a 64-bit installation of Fedora 15. The Eclipse downloaded from the official website works fine.

$ rpm -q eclipse-platform
eclipse-platform-3.6.2-5.fc15.x86_64
Comment 4 Alexander Kurtakov 2011-07-06 03:54:07 EDT
Here is the story.  org/w3c/dom/ElementTraversal was part of xalan-j2 but upstream xalan devs decided to remove parts that were duplicating parts of xml-commons-apis (which they already depend on) so when using latest xalan (org.apache.xml.serializer and other Orbit bundles equivalents) one have to add xml-commons-apis to the RequireBundle directive in his bundles. Actually this is upstream most of the time and upstream have to adapt to current xalan.
There should be a way to make Fedora simulate this but I need a clean reproducer with packages in fedora.
Sorry, I don't have time to play with things that are not part of Fedora yet.
Comment 5 Bugzy Magro 2011-08-14 20:14:06 EDT
I have the same problem with PDT, what do we do, would installing xalan from earlier Fedora release like 10, 11 in Fedora 15 solve this problem?
Comment 6 Bugzy Magro 2011-08-15 13:49:51 EDT
Hello Alexander,

How do I add xml-commons-apis to the RequireBundle directive to what bundles.

Could u give a little example and help finish off this bug once and for all.

I don't understand how a bug would exist and there is no solution or work around explanation its self defeating.

Thank you.
Comment 7 Andy Tai 2011-08-15 13:59:38 EDT
Just in general:

Android development is a frequent operation for software developers these days.  Google uses Ubuntu most of the time as the Linux development environment.

Hope Fedora can give Android development support more thought as this is an important battle for Linux community user mind share.
Comment 8 Bugzy Magro 2011-08-15 14:07:05 EDT
Please Andy,

Do you by any chance understand how to "add xml-commons-apis package to the RequireBundle directive to what bundles" as Alexander described.

I quite appreciate that nothing is perfect but at least a little example of what to do, in tolerance of newbies or starters, would be of great help and encouragement to cotinue with Fedora.
Comment 9 Andrew Overholt 2011-08-15 16:40:05 EDT
(In reply to comment #7)
> Just in general:
> 
> Android development is a frequent operation for software developers these days.
>  Google uses Ubuntu most of the time as the Linux development environment.
> 
> Hope Fedora can give Android development support more thought as this is an
> important battle for Linux community user mind share.

I'd be surprised if Google uses the Ubuntu packages of Eclipse.
Comment 10 Bugzy Magro 2011-08-15 17:28:45 EDT
(In reply to comment #9)
> (In reply to comment #7)
> > Just in general:
> > 
> > Android development is a frequent operation for software developers these days.
> >  Google uses Ubuntu most of the time as the Linux development environment.
> > 
> > Hope Fedora can give Android development support more thought as this is an
> > important battle for Linux community user mind share.
> 
> I'd be surprised if Google uses the Ubuntu packages of Eclipse.

Can someone help get around this bug by applying Alexander's solution?
Comment 11 Alexander Kurtakov 2011-08-16 04:31:26 EDT
Can you try installing eclipse-wtp-common from Rawhide to check whether ADK will work after that ?
Comment 12 Alexander Kurtakov 2011-08-16 04:32:03 EDT
FWIW, ADK is working for me in Rawhide installation.
Comment 13 Bugzy Magro 2011-08-16 09:32:12 EDT
(In reply to comment #11)
> Can you try installing eclipse-wtp-common from Rawhide to check whether ADK
> will work after that ?

Problem still persists for PDT
Comment 14 Bugzy Magro 2011-08-16 11:36:32 EDT
Created attachment 915358 [details]
Comment

(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).
Comment 15 Bugzy Magro 2011-08-16 11:59:45 EDT
This is what I did looking at the log file: I figured out the bundles that were throwing errors due to: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal

I then went into the following bundles:

org.eclipse.php.debug.core
org.eclipse.php.debug.daemon

Added xml.commons.apis to the required bundles of the above mentioned bundles after moving xml-commons-apis from /usr/share/java to /usr/lib/eclipse/plugins and renamed it xml.commons.apis

Error still persists, can anyone please help.
Comment 16 Antti Andreimann 2011-08-24 17:53:16 EDT
Not sure if it helps, but I had a similar problem when m2eclipse plugin started throwing errors in POM editor after I installed wtp.
The reason was that some JARs installed by plugins conflicted with the ones present in /usr/share/eclipse/dropins/dtp-enablement/eclipse/plugins/

I removed the following conflicting files from my ~/.eclipse/*/plugins :
javax.xml_1.3.4.v201005080400.jar
org.apache.xerces_2.9.0.v201005080400.jar
org.apache.xml.resolver_1.2.0.v201005080400.jar
org.apache.xml.serializer_2.7.1.v201005080400.jar

And it works now!

Running on Fedora 15 with eclipse-platform-3.6.2-5.fc15.x86_64 and eclipse-dtp-1.8.2-1.fc15.noarch
Comment 17 Dawid Lorenz 2011-08-25 17:34:17 EDT
(In reply to comment #16)
> Not sure if it helps, but I had a similar problem when m2eclipse plugin started
> throwing errors in POM editor after I installed wtp.
> The reason was that some JARs installed by plugins conflicted with the ones
> present in /usr/share/eclipse/dropins/dtp-enablement/eclipse/plugins/
> 
> I removed the following conflicting files from my ~/.eclipse/*/plugins :
> javax.xml_1.3.4.v201005080400.jar
> org.apache.xerces_2.9.0.v201005080400.jar
> org.apache.xml.resolver_1.2.0.v201005080400.jar
> org.apache.xml.serializer_2.7.1.v201005080400.jar
> 
> And it works now!
> 

Seems to do the trick for me as well (with Android SDK plugin)!
Comment 18 William Lovaton 2011-08-29 00:13:44 EDT
I was seeing this error with Fedora Eclipse and PDT, as suggested in this forum:
http://www.eclipse.org/forums/index.php/mv/msg/234748/716096/#msg_716096

Removing eclipse-dtp did the trick, it now seems to work without any error.

Is this going to be fixed in Rawhide?
Comment 19 Andrew Overholt 2011-09-02 11:31:28 EDT
*** Bug 735374 has been marked as a duplicate of this bug. ***
Comment 20 Germano Massullo 2011-09-09 04:32:33 EDT
Today I am starting developing JSPs, so when I opened editor for my first JSP page I get the following errors that I think they concern this bug.


java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:580)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
	at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
	at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache.fetchDescriptor(DeploymentDescriptorPropertyCache.java:750)
	at org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache.getCachedDescriptor(DeploymentDescriptorPropertyCache.java:812)
	at org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache.getPropertyGroups(DeploymentDescriptorPropertyCache.java:873)
	at org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager.handlePreludes(TLDCMDocumentManager.java:961)
	at org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager$DirectiveStructuredDocumentRegionHandler.nodeParsed(TLDCMDocumentManager.java:188)
	at org.eclipse.wst.xml.core.internal.parser.XMLSourceParser.fireNodeParsed(XMLSourceParser.java:135)
	at org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser.parseNodes(JSPSourceParser.java:296)
	at org.eclipse.wst.xml.core.internal.parser.XMLSourceParser.getDocumentRegions(XMLSourceParser.java:173)
	at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser._core_reparse_text(StructuredDocumentReParser.java:310)
	at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.core_reparse(StructuredDocumentReParser.java:710)
	at org.eclipse.jst.jsp.core.internal.parser.JSPReParser.reparse(JSPReParser.java:143)
	at org.eclipse.wst.sse.core.internal.text.StructuredDocumentReParser.reparse(StructuredDocumentReParser.java:1291)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.updateModel(BasicStructuredDocument.java:2709)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.internalReplaceText(BasicStructuredDocument.java:1923)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2419)
	at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.set(BasicStructuredDocument.java:2931)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.setDocumentContent(ResourceTextFileBuffer.java:575)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.initializeFileBufferContent(ResourceTextFileBuffer.java:286)
	at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.create(ResourceFileBuffer.java:245)
	at org.eclipse.core.internal.filebuffers.TextFileBufferManager.connect(TextFileBufferManager.java:112)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.createFileInfo(TextFileDocumentProvider.java:559)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:478)
	at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4056)
	at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:217)
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1444)
	at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:169)
	at org.eclipse.wst.sse.ui.StructuredTextEditor.doSetInput(StructuredTextEditor.java:1908)
	at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3043)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606)
	at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3061)
	at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3088)
	at org.eclipse.wst.sse.ui.StructuredTextEditor.init(StructuredTextEditor.java:2553)
	at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254)
	at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207)
	at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:497)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
	at org.eclipse.ui.internal.PartStack.add(PartStack.java:483)
	at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
	at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
	at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
	at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
	at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778)
	at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677)
	at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2860)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2674)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:683)
	at org.python.pydev.navigator.actions.PyOpenResourceAction.openFiles(PyOpenResourceAction.java:100)
	at org.python.pydev.navigator.actions.PyOpenPythonFileAction.run(PyOpenPythonFileAction.java:85)
	at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221)
	at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131)
	at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
	... 132 more


Does exist a workaround? I really need Eclipse working well
Comment 21 Germano Massullo 2011-09-09 04:47:12 EDT
(In reply to comment #16)
> Not sure if it helps, but I had a similar problem when m2eclipse plugin started
> throwing errors in POM editor after I installed wtp.
> The reason was that some JARs installed by plugins conflicted with the ones
> present in /usr/share/eclipse/dropins/dtp-enablement/eclipse/plugins/
> 
> I removed the following conflicting files from my ~/.eclipse/*/plugins :
> javax.xml_1.3.4.v201005080400.jar
> org.apache.xerces_2.9.0.v201005080400.jar
> org.apache.xml.resolver_1.2.0.v201005080400.jar
> org.apache.xml.serializer_2.7.1.v201005080400.jar
> 
> And it works now!
> 
> Running on Fedora 15 with eclipse-platform-3.6.2-5.fc15.x86_64 and
> eclipse-dtp-1.8.2-1.fc15.noarch

Yeah, perfectly works, thank you and thankk to akurtakov in #fedora-java freenode channel
Comment 22 JeanClaude Magras 2011-11-02 10:59:14 EDT
I have the same problem.
I have the same problem, selinux on or off.
I have the same problem just firing up eclipse to work on jsp documents
    no Android involved.
I have the same problem with a quite up-to-date as of 22 Oct 2011 F15 install.
I have the same problem with a Xeon X3220 based box with 6 Gig.
And your fix does seem to work. 
Now put it into the fix stream.
Comment 23 Alexander Kurtakov 2011-11-02 11:14:56 EDT
(In reply to comment #22)
> I have the same problem.
> I have the same problem, selinux on or off.
> I have the same problem just firing up eclipse to work on jsp documents
>     no Android involved.
> I have the same problem with a quite up-to-date as of 22 Oct 2011 F15 install.
> I have the same problem with a Xeon X3220 based box with 6 Gig.
> And your fix does seem to work. 
> Now put it into the fix stream.

There is not much we can do - there is a conflict of some plugins using old xalan that has xml-commons-apis bundled and others the new one without. We do use the new one that's why this bug is as much a problem in our rpms as much it is in different upstream plugins. 
There is also eclipse-wtp-sourceediting which should allienate part of the problem for people that want to do the sourceediting part.
Comment 24 Alexander Kurtakov 2011-11-02 11:16:51 EDT
Oh, and I forgot to say we do our best and we always welcome people willing to help us. We really do our best and but this is quite the maximum we can get out with the current workforce.
Comment 25 fedora.9076 2011-11-19 06:14:54 EST
Hello,

this is just for notice for other people. I had the same problem on Fedora 16 such that when I tried to start my fresh install of Eclipse Indigo on Fedora 16 with my workspace from Fedora 15, the Android Plugin threw error

org/w3c/dom/ElementTraversal.

Out of sheer lack of time, I simply tried Antti Andreimanns (2011-08-24 17:53:16 EDT) solution from above.

...
I removed the following conflicting files from my ~/.eclipse/*/plugins :
javax.xml_1.3.4.v201005080400.jar
org.apache.xerces_2.9.0.v201005080400.jar
org.apache.xml.resolver_1.2.0.v201005080400.jar
org.apache.xml.serializer_2.7.1.v201005080400.jar
...

And it worked for me, too. So, thanks to Antti, and hope this helps on Fedora 16.

Regards
Bernhard
Comment 26 Abdel Gadiel Martínez Lassonde 2011-12-22 20:32:01 EST
Hello.  I had the same situation as everyone here, but in my case I was developing a dynamic web site (JSP/HTML/Java).

At the moment I try to edit a JSP file, the same error with org/w3c/dom/ElementTraversal appears.  I tried to reinstall Eclipse but it doesn't work.

Finally, I tried what Bernhard (fedora.9076) did.  It actually works.

I'm on Eclipse Indigo and Fedora 16.

Regards,
Abdel G. Martínez L.
Comment 27 Marcin Rzeźnicki 2011-12-28 17:43:17 EST
While removing aforementioned files works for me (as far as working Eclipse installation is concerned), it is not that great - this trick breaks Oracle Web Tools (Glassfish plugin for Eclipse)!! All this is greatly uncomfortable. Is there anything else I can do to have working Eclipse AND Oracle Web Tools (my wild guess is that other plugins may be broken by this solution as well)?
Comment 28 Antti Andreimann 2011-12-29 05:35:07 EST
First I would ask You to verify that you are running the latest OEPE (currently 12c) that is known to work well with Eclipse Indigo.

For reference these are the latest versions of glassfish stuff available directly from Oracle as of today:
features/oracle.eclipse.tools.indigo.glassfish_2.0.0.201111040904.jar
plugins/oracle.eclipse.tools.glassfish_4.2.0.201111040904.jar

============= DISCLAIMER ==================
The following is pure speculation deducted from various configuration files.
I do not use OEPE personally and I did not install it to verify my theories!
===========================================

Inside latest OEPE ZIP download (oepe-indigo-repository-12.1.1.0.0.201112072225.zip) there are two Oracle specific plugins that depend on Xerces (according to content.xml):
1. Oracle GlassFish Server Tools - requires any version of xerces
2. Oracle ADF Debugger Tools - requires xerces 2.9.0 - 2.10.0

Fedora has xerces 2.11.0.

It is perfectly possible that dependencies of GlassFish Server Tools are just wrong so the plugin is likely to break in other Eclipse installations that use a newer version of xerces as well.

You can either:
1. Remove "Oracle ADF Debugger Tools" and see if this helps
2. Remove eclipse-dtp RPM package and re-install OEPE plugins
3. Manually install a non-packaged version of Eclipse under /opt

Either way it would be nice if You opened a bug at http://glassfishplugins.java.net/ about their use of deprecated libraries.
Affected version:
oracle.eclipse.tools.indigo.glassfish.feature.group 2.0.0.201111040904
Comment 29 Antti Andreimann 2011-12-29 08:47:27 EST
After thinking a bit more about it, maybe there is a fourth way.

Try to remove conflicting files in ~/.eclipse/*/plugins
one by one. I would suggest to do it in the following order:
1. javax.xml_1.3.4.v201005080400.jar
2. org.apache.xml.resolver_1.2.0.v201005080400.jar
3. org.apache.xml.serializer_2.7.1.v201005080400.jar
4. org.apache.xerces_2.9.0.v201005080400.jar
Comment 30 Marcin Rzeźnicki 2011-12-29 16:06:47 EST
(In reply to comment #28)
> First I would ask You to verify that you are running the latest OEPE (currently
> 12c) that is known to work well with Eclipse Indigo.
> 

I am not using EclipseIndigo, I am currently on Eclipse Galileo (3.6.1) from the Fedora 15 repository

> For reference these are the latest versions of glassfish stuff available
> directly from Oracle as of today:
> features/oracle.eclipse.tools.indigo.glassfish_2.0.0.201111040904.jar
> plugins/oracle.eclipse.tools.glassfish_4.2.0.201111040904.jar

That's actually not what I am using, for my version of Eclipse I've installed oracle.eclipse.tools.glassfish_3.2.3.201106201340

> After thinking a bit more about it, maybe there is a fourth way.
>
> Try to remove conflicting files in ~/.eclipse/*/plugins
> one by one. I would suggest to do it in the following order:
> 1. javax.xml_1.3.4.v201005080400.jar
> 2. org.apache.xml.resolver_1.2.0.v201005080400.jar
> 3. org.apache.xml.serializer_2.7.1.v201005080400.jar
> 4. org.apache.xerces_2.9.0.v201005080400.jar

Thank you so much, that did the trick. It comes out that for both Eclipse and Glassfish plugin to work (meaning - plugin is available and various operations performed by Eclipse do not throw CNF exception) it suffices to delete ONLY javax.xml_1.3.4* I deleted all these files at once previously, it turns out it wasn't the best idea. As for now, everything is seemingly correct. Thanks once again for your help.
That said, I'd very like this bug to be fixed as it potentially affects many developers and I believe it is not right to go through all this chores just to have your IDE working after an update. In the meantime I advise to delete just the javax.xml_1.3.4 jar. Thanks a lot once more.
Comment 31 Antti Andreimann 2011-12-30 10:40:33 EST
I have discovered that xml-commons-apis RPM in Fedora injects it's own OSGI manifests into JAR-s.

The bundle version in manifest is hardcoded to 1.3.4.v200806030440
Eclipse plugins however seem to install a JAR with bundle version set to 1.3.4.v201005080400.

It's a long shot, but maybe updating the bundle version will make eclipse prefer a packaged version over the old crap installed by some plugin.

Unfortunately the bug is no longer reproducible on my system and I do not have time to try out Glassfish or Android extensions.

I have created a scratch build to test this idea at
http://koji.fedoraproject.org/koji/taskinfo?taskID=3610950

Could someone please verify that it helps?

How to test:

1. Verify that eclipse works as expected
2. Put the conflicting files (especially javax.xml_1.3.4.v201005080400.jar) back to ~/.eclipse/*/plugins
3. Start eclipse and verify that your installation is now broken
4. Close eclipse
5. Upgrade to xml-commons-apis-1.4.01-6.fc15.noarch.rpm (this package should work on F16 as well)
6. Start eclipse
7. If it is still broken, close eclipse, delete conflicting files and retry steps 1 - 3 to see if new JAR-s will be picked up then.

Thank you!

Happy new year.
Comment 32 Germano Massullo 2012-01-15 15:56:07 EST
xml-commons-apis-1.4.01-6.fc15.noarch.rpm are not in update-testing repository
Comment 33 Youri Westerman 2012-02-02 16:12:16 EST
Ok this is starting to drive me towards insanity...
For me to be able to use jdt in anyway I have to remove my ~/.eclipse folder every time before starting eclipse and now the only way to edit/view jsp files is removing a couple of jar files that aren't even available when I start eclipse (or after)!
I'm following bug report after bug report, but really I just want to complete some projects...
I reckon the only way to get eclipse to work decently now is to install a non-package version or does someone know of some magic to get the packaged version to work without removing dirs/files?
I'm running fc16 and eclipse 3.1.7-7 although eclipse creates a folder named: org.eclipse.platform_3.7.0_155965261 in my ~/.eclipse folder on startup.

Thanks in advance...
Comment 34 Andrew Overholt 2012-02-02 16:40:55 EST
(In reply to comment #33)
> Ok this is starting to drive me towards insanity...
> For me to be able to use jdt in anyway I have to remove my ~/.eclipse folder
> every time before starting eclipse and now the only way to edit/view jsp files
> is removing a couple of jar files that aren't even available when I start
> eclipse (or after)!

JDT works fine for me and I never have to touch ~/.eclipse.

Are you using WTP installed on top via Help->Install ?
Comment 35 Germano Massullo 2012-02-02 16:46:11 EST
(In reply to comment #33)
> Ok this is starting to drive me towards insanity...
> For me to be able to use jdt in anyway I have to remove my ~/.eclipse folder
> every time before starting eclipse and now the only way to edit/view jsp files
> is removing a couple of jar files that aren't even available when I start
> eclipse (or after)!
> I'm following bug report after bug report, but really I just want to complete
> some projects...
> I reckon the only way to get eclipse to work decently now is to install a
> non-package version or does someone know of some magic to get the packaged
> version to work without removing dirs/files?
> I'm running fc16 and eclipse 3.1.7-7 although eclipse creates a folder named:
> org.eclipse.platform_3.7.0_155965261 in my ~/.eclipse folder on startup.
> 
> Thanks in advance...

I am developing a JSF project so maybe I can help you.
Remove all Eclipse packages from the computer.
#yum install eclipse
and then open it, Help menu->install new softare-> click on Avaible software sites.
Then look for a repository that has http://download.eclipse.org/releases/indigo
If you do not find it, create a new one or edit one that already exists.

Go back in install new software and select this repository. Install   "Web, XML, Java EE and OSGi Enterprise Development"
Close Eclipse and delete the jar files as in comment #16
Comment 36 Alexander Kurtakov 2012-02-03 02:22:15 EST
Have you tried installing eclipse-wtp-sourceediting? This should give you the xml, jsp, css ... editing tools.
Comment 37 Alexander Kurtakov 2012-02-03 02:23:11 EST
I mean yum install eclipse-wtp-sourceediting
Comment 38 Germano Massullo 2012-02-05 14:03:03 EST
*** Bug 735652 has been marked as a duplicate of this bug. ***
Comment 39 Germano Massullo 2012-03-12 16:22:42 EDT
This annoying bug is still here, any news please?
Comment 40 Krzysztof Daniel 2012-04-17 16:09:43 EDT
The problem is caused by the fact that the org.apache.xerces does not see the org.w3c.dom package. A simple import in that package could solve this, but I will investigate this further.

In the meantime I will attach a simple fragment that resolved the issue for me (I was able to install android SDK with packaged eclipse, dtp, upstream wtp and this fix, and run the emulator with a simple application)
Comment 41 Krzysztof Daniel 2012-04-17 16:11:34 EDT
Created attachment 578135 [details]
A source of the fix

The fragment needs to be installed into a host platform (and built first).
Comment 42 Alexander Kurtakov 2012-04-17 16:59:49 EDT
(In reply to comment #40)
> The problem is caused by the fact that the org.apache.xerces does not see the
> org.w3c.dom package. A simple import in that package could solve this, but I
> will investigate this further.
> 
> In the meantime I will attach a simple fragment that resolved the issue for me
> (I was able to install android SDK with packaged eclipse, dtp, upstream wtp and
> this fix, and run the emulator with a simple application)

I'm able to do that without this fix by using eclipse-wtp-* packages! :)
Comment 43 Krzysztof Daniel 2012-04-18 03:56:21 EDT
(In reply to comment #42)

> I'm able to do that without this fix by using eclipse-wtp-* packages! :)

I am checking that. I am sure I was not able to run the project with upstream wtp because of the org/w3c/dom/ElementTraversal not found. But I still think that xerces-j2 package is buggy in the sense that it Requires xml-commons-apis but does not reflect that in OSGi.

Things will fail each time when xerces will be used, but javax.xml will be not imported in the same feature/parent plugin/not-sure-exactly-what-is-the-classloading-hierarchy.

Check results:
I still get exception on startup:
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:632)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:607)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:568)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
	at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
	at com.android.ide.common.resources.platform.AttrsXmlParser.getDocument(AttrsXmlParser.java:236)
	at com.android.ide.common.resources.platform.AttrsXmlParser.preload(AttrsXmlParser.java:135)
	at com.android.ide.eclipse.adt.internal.sdk.AndroidTargetParser.run(AndroidTargetParser.java:133)
	at com.android.ide.eclipse.adt.internal.sdk.Sdk$5.run(Sdk.java:555)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	... 30 more
Comment 44 Krzysztof Daniel 2012-04-18 04:18:05 EDT
Created attachment 578267 [details]
Fix proposition

After building xerces with this patch, adt seems to work fine for me.
Comment 45 Krzysztof Daniel 2012-04-19 02:47:47 EDT
Alex, 
any chance to get it pushed?
Comment 46 Krzysztof Daniel 2012-04-23 02:35:49 EDT
Created attachment 579422 [details]
Fix created by git format-patch
Comment 47 Fedora Update System 2012-04-30 07:41:35 EDT
xerces-j2-2.11.0-7.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/xerces-j2-2.11.0-7.fc17
Comment 48 Fedora Update System 2012-04-30 14:47:36 EDT
Package xerces-j2-2.11.0-7.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xerces-j2-2.11.0-7.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-6937/xerces-j2-2.11.0-7.fc17
then log in and leave karma (feedback).
Comment 49 Fedora Update System 2012-05-03 05:53:54 EDT
eclipse-birt-4.2.0-0.4.M6.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/eclipse-birt-4.2.0-0.4.M6.fc17
Comment 50 Fedora Update System 2012-05-06 00:55:35 EDT
xerces-j2-2.11.0-7.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 51 Paulo Fidalgo 2012-08-27 09:19:26 EDT
To use the Spring Tool Suite ( http://www.springsource.org/sts ) I still need to delete the jars from comment #29.

I'm using F17 with the latest updates, and before trying I've deleted my old $HOME/.eclipse dir, to avoid conflicts.
Comment 52 Gerard Ryan 2012-10-25 17:39:44 EDT
I'm currently getting the same:
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal

on Eclipse 4.2.1 on F18.

I've got xml-commons-apis-1.4.01-8.fc18.noarch installed, and it's listed in Eclipse Platform Installation Details -> Plug-ins (javax-xml 1.3.4.v200806030440)
Comment 53 Samuel Sieb 2012-11-09 23:49:41 EST
I'm seeing this as well on F18.  And the previous workaround doesn't work as those jars don't exist.  Since I can't find any mention of this elsewhere, I'm assuming (perhaps incorrectly) that it's something specific to Fedora.  Would it be better to open a new bug for this?

!ENTRY com.android.ide.eclipse.adt 4 0 2012-11-09 20:39:45.237
!MESSAGE Exception in checkAndLoadTargetData.
!STACK 0
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:632)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:607)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:568)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
        at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
        at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
        at com.android.ide.common.resources.platform.AttrsXmlParser.getDocument(AttrsXmlParser.java:246)
        at com.android.ide.common.resources.platform.AttrsXmlParser.preload(AttrsXmlParser.java:145)
        at com.android.ide.eclipse.adt.internal.sdk.AndroidTargetParser.run(AndroidTargetParser.java:133)
        at com.android.ide.eclipse.adt.internal.sdk.Sdk$5.run(Sdk.java:559)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 30 more
Comment 54 Gerard Ryan 2012-11-11 10:18:45 EST
This issue appears to have come back due to changes in xerces-j2-2.11.0-9.

Downgrading to xerces-j2-2.11.0-8 solved this for me.
Comment 55 Samuel Sieb 2012-11-11 14:21:02 EST
Unfortunately, downgrading to xerces-j2-2.11.0-8.fc18.noarch doesn't seem to have made any difference.  Is there an extra step I'm missing?  Does eclipse keep some sort of cache?
Comment 56 Gerard Ryan 2012-11-13 17:54:13 EST
You can try first running Eclipse from a terminal with: eclipse -clean

I may have spoken too soon though: downgrading fixed this particular error dialog, but it caused another one :/
Comment 57 Gerard Ryan 2012-11-13 20:30:59 EST
For posterity, the problem that I get in the older xerces-j2 is:

Class org.apache.xerces.parsers.SAXParser does not implement the requested interface org.xml.sax.XMLReader
Comment 58 Samuel Sieb 2012-11-14 12:36:54 EST
I just tried it in F17 which also has Eclipse Juno and it works.  I will try again in F18 with a clean eclipse.
Comment 59 Samuel Sieb 2012-11-14 14:12:19 EST
I tried with a clean eclipse in F18.  With xerces-j2-2.11.0-8.fc18.noarch I get this error:
SDK parser failed
cannot be cast to javax.xml.parsers.DocumentBuilderFactory
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory

With xerces-j2-2.11.0-9.fc18.noarch I still get the original class not found error.

I just discovered that the eclipse-dtp includes a copy of org.apache.xerces_2.9.0.jar.  I removed that package and I don't get the ElementTraversal error any more even with xerces-j2-2.11.0-9.fc18 installed.  However, now I get this error:
java.lang.IncompatibleClassChangeError: Class org.eclipse.wst.xml.core.internal.document.DocumentImpl does not implement the requested interface org.w3c.dom.Document
Comment 60 Samuel Sieb 2012-11-14 14:42:28 EST
I see that the Android plugin includes its own copy of xerces 2.9.0 as well.  But removing that makes all the Android interfaces disappear from eclipse.

Is it a difference between Eclipse on F17 and F18 or the other Java packages around it?
Comment 61 Gerard Ryan 2012-11-14 18:03:54 EST
The org.apache.xerces_2.9.0.jar in eclipse-dtp isn't actually 2.9.0, it's a symlink to the system installed xerces-j2 jar. It is a little odd that it would have an old version number in the link though!
Comment 62 Samuel Sieb 2012-11-15 01:27:28 EST
That is interesting.  Eclipse was picking it up though, and it doesn't seem to pick up the system one without that link.  There is a definite change in behaviour if that link is gone.
Comment 63 Krzysztof Daniel 2012-11-15 10:08:03 EST
So, xerces-j2 8th release causes "Class org.apache.xerces.parsers.SAXParser does not implement the requested interface org.xml.sax.XMLReader" because the plugin that loads SAXParser has loaded org.xml.sax using different classloader than xerces.

If we remove the explicit import of javax.xml in xerces (release 7 & 9) we get java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal because the class is not accessible to the calling plugin (xerces).

In this case, the only thing that may help - is importing missing packages rather than the entire javax.xml.

Could you try this build http://koji.fedoraproject.org/koji/taskinfo?taskID=4692076 ?
Comment 64 Gerard Ryan 2012-11-15 15:18:55 EST
(In reply to comment #63)
> In this case, the only thing that may help - is importing missing packages
> rather than the entire javax.xml.
> 
> Could you try this build
> http://koji.fedoraproject.org/koji/taskinfo?taskID=4692076 ?

That build didn't work: eclipse failed to pick up org.apache.xerces altogether there. It appears to be that the wildcard given to "Import-Package" (org.w3c.dom.*) broke it.

I made a change to explicitly import all of the packages, but I think it was still getting org.w3c.dom from openjdk (it seems to provide some classes for that package, but not others?)

So then I got the versions of all org.w3c.dom packages from xml-commons-apis manifest, and passed them all to Import-Package in the manifest:

Import-Package: org.w3c.dom;version="3.0",org.w3c.dom.bootstrap;version="3.0",org.w3c.dom.css;version="3.0",org.w3c.dom.events;version="3.0",org.w3c.dom.html;version="3.0",org.w3c.dom.ls;version="3.0",org.w3c.dom.ranges;version="3.0",org.w3c.dom.stylesheets;version="3.0",org.w3c.dom.traversal;version="3.0",org.w3c.dom.views;version="3.0",org.w3c.dom.xpath;version="3.0"

That worked to a degree, but it caused another problem with eclipse. The java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal message is no longer being displayed in Eclipse (also, eclipse-wtp-webservices builds against it successfully again)  A dialog now displays with the following message:

An internal error occurred during: "JBoss Tools Project Validator".
loader constraint violation: when resolving overridden method "org.apache.xerces.jaxp.DocumentBuilderImpl.newDocument()Lorg/w3c/dom/Document;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/apache/xerces/jaxp/DocumentBuilderImpl, and its superclass loader (instance of <bootloader>), have different Class objects for the type /dom/Document; used in the signature

I don't fully understand what that message means. Is it that org.apache.xerces.jaxp.DocumentBuilderImpl gets compiled against org.w3c.dom.Document from somewhere other than xml-commons-apis, but Eclipse wants to use the xml-commons-apis one because of the modified manifest, and there's a difference?
^Some of that may not have made sense.
Comment 65 Krzysztof Daniel 2012-11-16 03:32:18 EST
I'm trying to rebuild Eclipse without javax.xml at all. Given that I'll repeat that for eclipse-dtp (and whatever is using that bundle) we will have all the stuck using the jvm packages. If it does not help - the only way to fix that will be to package ADT.
Comment 66 Krzysztof Daniel 2012-11-16 06:37:49 EST
Here is a new set of packages to try out:
http://kdaniel.fedorapeople.org/javax/

There is xerces without javax.xml import (nor any other package import).
Eclipse is built without javax.xml plugin. All packages must be then imported from VM. We should have no more conflicts...
Comment 67 Gerard Ryan 2012-11-16 18:07:55 EST
(In reply to comment #66)
> Here is a new set of packages to try out:
> http://kdaniel.fedorapeople.org/javax/
> 
> There is xerces without javax.xml import (nor any other package import).
> Eclipse is built without javax.xml plugin. All packages must be then
> imported from VM. We should have no more conflicts...

Ok, I've tried those new packages, and if I install them into a rawhide mock environment, I can build the eclipse-wtp-webservices package that I couldn't before (with the addition of importing the versioned packages from comment #64 there, rather than in xerces-j2). I don't know any way that I can open eclipse to test it from that environment though (I don't have any rawhide machine yet). Could you upload the srpms for those packages, and I'll build them for f18, then I'll be able to try it?
Comment 68 Krzysztof Daniel 2012-11-19 02:57:25 EST
http://kdaniel.fedorapeople.org/javax/srpms/
Comment 69 Gerard Ryan 2012-11-21 19:06:46 EST
Created attachment 649449 [details]
git format-patch - re-add javax.xml & system.bundle

(In reply to comment #68)
> http://kdaniel.fedorapeople.org/javax/srpms/

Thanks. Unfortunately those changes unfortunately didn't seem to change anything (positively or negatively).

I've tried a couple of different things, and one seems to have worked: re-adding javax.xml and system.bundle (both were removed about 9 months ago in commit 984153f). It might be worth asking Andrew Overholt what the motivation for removing them is, as I'm sure it was for valid reasons.

I'm not sure what system.bundle does, or why this works, but it does. This patch doesn't appear to produce any negative effects.
Comment 70 Krzysztof Daniel 2012-11-22 03:19:27 EST
You can read about system bundle here: http://wiki.osgi.org/wiki/System_Bundle.

Amongst other things, it reexports JRE packages (including those that are in javax.xml). So it looks like one of those is not necessary... unless this is a huge hack - we let the OSGi to choose which package implementation it should use. 

Since I don't have a better alternative, I will give this a try.
Comment 71 Alexander Kurtakov 2012-11-22 03:52:20 EST
No package should require system.bundle. This would effectively mean that your package needs an osgi container to work which is not true for xerces-j2. If you readd system.bundle requirement xerces-j2 will start depending on eclipse-equinox or on felix-framework.
Comment 72 Krzysztof Daniel 2012-11-22 04:17:50 EST
The main problem we have here is that we have a set of classes that come from JVM and from xerces-j2. Some projects use the VM implementation, some not, hence it is possible to get various exceptions.

We need to get consistent here - it is either complete removal of xerces-j2 from all Fedora bundled Eclipse projects or having it everywhere and not using vm packages (but there is no time in F18 for that), moving to Kepler will be a good opportunity. It's a matter of choice between being close to upstream or limiting the number of dependencies.

The dependency between xerces-j2 and system.bundle exists in the OSGi world (because system.bundle is mandatory, always), but not in the RPM worlds (because xerces-j2 may work as a regular jar). I think this is the thing you want to avoid is pulling OSGI framework when you install xerces-j2 - I'd rather go for blacklisting the system.bundle from autogenerated deps. What do you think about that?
Comment 73 Alexander Kurtakov 2012-11-22 04:29:10 EST
Blacklisting system.bundle in general is not an option because it means also dependency on org.osgi.* which we need it to be properly generated. 
I'm always for minimizing dependencies and with all the delays for F18 we might have the time for it. Also as upstream is moving to 1.5 xerces can be removed even there.
Comment 74 Krzysztof Daniel 2012-11-23 08:36:53 EST
Gerard,
I have removed javax.xml from the eclipse and from eclipse, eclipse-dtp and eclipse-mylyn (in rawhide only). Could you try rebuilding webtools there? Is there any dependency to javax.xml?
Comment 75 Gerard Ryan 2012-11-23 08:51:03 EST
(In reply to comment #74)
> Gerard,
> I have removed javax.xml from the eclipse and from eclipse, eclipse-dtp and
> eclipse-mylyn (in rawhide only). Could you try rebuilding webtools there? Is
> there any dependency to javax.xml?

I intended to mention this, I don't know how I didn't: I managed to get the failing webtools to build by explicitly importing the packages from xml-commons-apis:

Import-Package: org.w3c.dom;version="3.0",org.w3c.dom.bootstrap;version="3.0",org.w3c.dom.css;version="3.0",org.w3c.dom.events;version="3.0",org.w3c.dom.html;version="3.0",org.w3c.dom.ls;version="3.0",org.w3c.dom.ranges;version="3.0",org.w3c.dom.stylesheets;version="3.0",org.w3c.dom.traversal;version="3.0",org.w3c.dom.views;version="3.0",org.w3c.dom.xpath;version="3.0"


So it worked for f17 and f18, but rawhide fails for a different reason. It seems to be a pdebuild problem:

java.io.FileNotFoundException: /usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_3.8.1.v20121113-1808/scripts/${eclipse.pdebuild.scripts}/genericTargets.xml (No such file or directory)

http://koji.fedoraproject.org/koji/taskinfo?taskID=4706470

Is that caused by something changed in Eclipse itself, or is it something I should be able to fix in webtools packages?
Comment 76 Krzysztof Daniel 2012-11-23 09:10:24 EST
Please retry when https://koji.fedoraproject.org/koji/taskinfo?taskID=4720961 is complete, and if it fails again open a bug. I will not look into this before the weekend...
Comment 77 Fedora Update System 2012-12-12 03:59:00 EST
xerces-j2-2.11.0-10.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2012-20169/xerces-j2-2.11.0-10.fc18
Comment 78 Fedora Update System 2012-12-17 04:29:38 EST
xerces-j2-2.11.0-11.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/xerces-j2-2.11.0-11.fc18
Comment 79 Samuel Sieb 2012-12-17 18:42:28 EST
I just installed xerces-j2-2.11.0-11.fc18 and I can now use the Android plugin.
Comment 80 Fedora Update System 2013-01-11 19:05:13 EST
xerces-j2-2.11.0-11.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.