Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 448495

Summary: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: DiagramAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: cedric.brun, cmordant1, error-reports-inbox, florian.barbin, jod, jonathan.dumont, maxime.porhel, pierre-charles.david
Version: 1.0.0Keywords: triaged
Target Milestone: 1.0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 439095    
Bug Blocks:    

Description Maxime Porhel CLA 2014-10-23 09:27:12 EDT
+++ This bug was initially created as a clone of Bug #439095 +++

Hi,

I try to build a feature containing a graphical editor based on Sirius, to be able to install it in an existing RCP application.

The problem is that when I try to open an editor containing 'Dot' representations, I have the following exception :

[code]
    java.io.IOException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
	at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
	at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
	at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source)
	at org.eclipse.sirius.diagram.ui.tools.api.figure.SVGFigure.loadDocument(SVGFigure.java:90)
	at org.eclipse.sirius.diagram.ui.tools.api.figure.SVGFigure.getDocument(SVGFigure.java:105)
	at org.eclipse.sirius.diagram.ui.tools.api.figure.BundledImageFigure.updateDocumentColors(BundledImageFigure.java:194)
	at org.eclipse.sirius.diagram.ui.tools.api.figure.BundledImageFigure.updateColors(BundledImageFigure.java:147)
	at org.eclipse.sirius.diagram.ui.tools.api.figure.BundledImageFigure.refreshFigure(BundledImageFigure.java:311)
	at org.eclipse.sirius.diagram.ui.tools.api.figure.BundledImageFigure.createImageFigure(BundledImageFigure.java:119)
	at org.eclipse.sirius.diagram.ui.internal.edit.parts.BundledImageEditPart.createNodeShape(BundledImageEditPart.java:133)
	at org.eclipse.sirius.diagram.ui.internal.edit.parts.BundledImageEditPart.createNodeFigure(BundledImageEditPart.java:189)
	at org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart.createFigure(ShapeNodeEditPart.java:90)
[/code]


If I don't misunderstood, my plugins included in this feature depend on the Sirius plugins, which depend themself on the Apache Batik plugins. But the Batik plugin references the Apache Xerces driver as an optional Import-Package :

[code]
Bundle-SymbolicName: org.apache.batik.dom
(...)
Import-package: org.w3c.dom,org.apache.xerces.parsers;resolution:=optional
[/code]


Is it normal that the Sirius plugin doesn't depend on the Xerces plugin to ensure that the optional package is resolved ?

Regards,
Jonathan
Comment 1 Maxime Porhel CLA 2014-10-23 09:27:43 EDT
See comments and analysis on Bug 439095
Comment 2 Maxime Porhel CLA 2014-10-23 09:38:29 EDT
Corrected by commits c4256ef02a0b330a06076278c0f4cf272bb475e4 and 274492deb1804c60b9485c9db33a381584bed223.

Correction has been cherry picked from master (2.0.0) branch
Comment 3 Florian Barbin CLA 2015-01-27 09:49:28 EST
Verified
Comment 4 Pierre-Charles David CLA 2015-01-29 04:34:38 EST
Available in Sirius 1.0.2.