Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Error exporting Diagram as image
Error exporting Diagram as image [message #1608104] Mon, 09 February 2015 09:24 Go to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
I am trying to export a pretty banal Class diagram as an image in Papyrus 1.0.1. No matter what file format I select, I always get back this error message:

Quote:
An internal error occurred during: "Generate".
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.


In the log the exception below is registered. What is going wrong? Thank you.

Message
An internal error occurred during: "Generate".


Exception Stack Trace
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
	at org.eclipse.papyrus.infra.export.ExportAllDiagrams.export(ExportAllDiagrams.java:177)
	at org.eclipse.papyrus.infra.export.ExportAllDiagrams.access$0(ExportAllDiagrams.java:161)
	at org.eclipse.papyrus.infra.export.ExportAllDiagrams$1.execute(ExportAllDiagrams.java:133)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.papyrus.infra.export.ExportAllDiagrams$2.run(ExportAllDiagrams.java:142)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
	at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:691)
	at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:557)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1743)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(XMLEntityScanner.java:1614)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(XMLEntityScanner.java:1652)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:196)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	... 9 more


Session Data
eclipse.buildId=4.4.1.M20140925-0400
java.version=1.8.0_31
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product

This is a continuation of log file /home/desousa/Eclipse/Luna/Workspace.Tudor/.metadata/.bak_0.log
Created Time: 2015-02-09 09:56:34.150
Re: Error exporting Diagram as image [message #1608612 is a reply to message #1608104] Mon, 09 February 2015 16:37 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 952
Registered: February 2011
Senior Member
Hi Luis,

This looks like an encoding issue. Do you have any special (non-ASCII) character in the diagram/model you are trying to export?

Papyrus models are supposed to be encoded in UTF-8; I'm not sure what would happen if the encoding was changed for any reason (e.g. manually editing the XML with a different encoding).

Camille


Camille Letavernier
Re: Error exporting Diagram as image [message #1609987 is a reply to message #1608612] Tue, 10 February 2015 13:28 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Hi Camille, thank you for the reply. I am not able to find any strange characters in the xml files:

$ iconv -f utf-8 -t utf-8 -c model.uml > model.uml.new
$ diff model.uml model.uml.new
$
$ iconv -f utf-8 -t utf-8 -c model.di > model.di.new
$ diff model.di model.di.new
$ 
$ iconv -f utf-8 -t utf-8 -c model.notation > model.notation.new
$ diff model.notation model.notation.new
$


Any other hints? Thank you.
Re: Error exporting Diagram as image [message #1612931 is a reply to message #1609987] Thu, 12 February 2015 09:40 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Hello again,

I am attaching the model, in case someone wishes to take a look. ANy ideas on what may be wrong are welcome.

Thanks.

Re: Error exporting Diagram as image [message #1618967 is a reply to message #1612931] Mon, 16 February 2015 08:43 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
This issue is now reported as Bug 459978.
Re: Error exporting Diagram as image [message #1665534 is a reply to message #1618967] Wed, 11 March 2015 09:18 Go to previous messageGo to next message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
I upgraded Papyrus to version 1.0.2 and this problem remains.

Regards.
Re: Error exporting Diagram as image [message #1670818 is a reply to message #1665534] Fri, 13 March 2015 10:51 Go to previous message
Luís de Sousa is currently offline Luís de SousaFriend
Messages: 214
Registered: July 2009
Senior Member
Camille Letavernier closed this issue in Bugzilla, the fix should be available in Mars.

In the meantime, is there any hope of getting this working on Luna? Is there something I could change in the XML itself?

Thanks.

[Updated on: Fri, 13 March 2015 10:56]

Report message to a moderator

Previous Topic:NPE on right click of a diagram in Papyrus diagram editor
Next Topic:Deferrable Triggers
Goto Forum:
  


Current Time: Wed Apr 24 14:02:16 GMT 2024

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

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

Back to the top