Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » SAX2 driver class org.apache.xerces.parsers.SAXParser not found
SAX2 driver class org.apache.xerces.parsers.SAXParser not found [message #1395796] Mon, 07 July 2014 12:08 Go to next message
Jonathan Dumont is currently offline Jonathan DumontFriend
Messages: 58
Registered: March 2011
Location: Laval
Member
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 :
    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)


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 :
Bundle-SymbolicName: org.apache.batik.dom
(...)
Import-package: org.w3c.dom,org.apache.xerces.parsers;resolution:=optional


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

Regards,
Jonathan




Re: SAX2 driver class org.apache.xerces.parsers.SAXParser not found [message #1396416 is a reply to message #1395796] Tue, 08 July 2014 09:08 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 503
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Jonathan,

I have just seen that you have created Bug 439095 [1] to report the
issue explained in this thread.

We will look into the issue and answer to your question on the bugzilla.

As a first workaround, it is working if your editor plugin declares the
dependance to xerces as required ? See the "Xerces in Eclipse" wiki page
[2].

Regards

Maxime

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=439095
[2] https://wiki.eclipse.org/Orbit/Xerces_in_Eclipse

Le 07/07/2014 14:08, Jonathan Dumont a écrit :
> 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 :
> 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)
>
>
>
> 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 :
>
> Bundle-SymbolicName: org.apache.batik.dom
> (...)
> Import-package: org.w3c.dom,org.apache.xerces.parsers;resolution:=optional
>
>
> Is it normal that the Sirius plugin doesn't depend on the Xerces plugin
> to ensure that the optional package is resolved ?
>
> Regards,
> Jonathan
>
>
>
>
>


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: SAX2 driver class org.apache.xerces.parsers.SAXParser not found [message #1396421 is a reply to message #1395796] Tue, 08 July 2014 09:17 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 503
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Jonathan,

As an additional answer, please note that RCP is not a primary target
for Sirius, and so be aware that various parts of Sirius depend on the
workspace and workbench.

Regards,

Maxime

Le 07/07/2014 14:08, Jonathan Dumont a écrit :
> 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 :
> 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)
>
>
>
> 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 :
>
> Bundle-SymbolicName: org.apache.batik.dom
> (...)
> Import-package: org.w3c.dom,org.apache.xerces.parsers;resolution:=optional
>
>
> Is it normal that the Sirius plugin doesn't depend on the Xerces plugin
> to ensure that the optional package is resolved ?
>
> Regards,
> Jonathan
>
>
>
>
>


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: SAX2 driver class org.apache.xerces.parsers.SAXParser not found [message #1396429 is a reply to message #1396421] Tue, 08 July 2014 09:29 Go to previous message
Jonathan Dumont is currently offline Jonathan DumontFriend
Messages: 58
Registered: March 2011
Location: Laval
Member
Hi,

Yes I have also created the following bug : 439095, as it has a real impact on our product. May it won't be confirmed as a bug, as it's a bit tricky ... And I can understand that it's not the main target for Sirius.

Juste to answer to your question, I have a workaround : I have create my own plugin containing the jar provided by Orbit to offer the needed packages. It's not the best solution I think but when I just add the dependencies to the Orbit plugins in my plugin, it doesn't work. The Apache Xerces plugin from Orbit is well included during my feature installation, but the driver is still not found.

Note : I will continue to fill the bug if needed instead of this thread.

[Updated on: Tue, 08 July 2014 09:32]

Report message to a moderator

Previous Topic:Sirius Display changes in Resource
Next Topic:Sequence Diagram Graphical Elements Ordering
Goto Forum:
  


Current Time: Mon Apr 19 10:29:12 GMT 2021

Powered by FUDForum. Page generated in 0.02347 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top