[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mdt-bpmn2.dev] PackageNotFoundException when trying to load XML (or XMI) from a InputStream

Hi devs,

I'm actually trying to parse a BPMN2 file coming from an InputStream
(I'm developing a REST service where you can send a BPMN file which will
be parsed to do stuff).  However, each time I'm trying to load the
stream, I reach a PackageNotFoundException.

This is the incriminated code as far as I know.

Bpmn2ResourceFactoryImpl resourceFactory = new Bpmn2ResourceFactoryImpl();

Resource resource =

resource.load(entityStream, Collections.EMPTY_MAP);

I've tried different bpmn2 file (XML and XMI) found here and there on
the web (some examples from bpmn-js, some export from MagicDraw, some
others found on this same mailing list, produced by Reiner) but each
time, I reach the same following error.  In case of XMI file, the error
is similar with a different URI (with MODEL-XMI).
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package
with uri 'http://www.omg.org/spec/BPMN/20100524/MODEL' not found.
(localhost:8080, 2, 472)
(see the complete log on [1]).

These are the files I tried. (see also the links).
[2] Atomic XML file
[3] simple XML file
[4] XMI file

I hope I give enough information.  Don't hesitate to ask for more if
needed.  At the moment, I'm completely stuck with this and don't find
any hint on how to move forward.

Thank you!

[1] https://ezcrypt.it/jKAn#eEmmCygtnxb6HSjJJ4tGsItP
[2] https://ezcrypt.it/nKAn#RbsYGEfHkSrHcnrAfE1qQypF
[3] https://ezcrypt.it/mKAn#AYlEUxSvpwyKQyAUzc5Pp5lB
[4] https://ezcrypt.it/oKAn#CEcWAZv2FufWdcQzapeaf8Ad
Jean Simard
Research engineer at XWiki SAS
Committer on the XWiki.org project