[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [mdt-bpmn2.dev] PackageNotFoundException when trying to load XML (or XMI) from a InputStream
- From: "Hille-Doering, Reiner" <reiner.hille-doering@xxxxxxx>
- Date: Fri, 27 Feb 2015 16:23:01 +0000
- Accept-language: de-DE, en-US
- Delivered-to: firstname.lastname@example.org
- Thread-index: AQHQUqQiCk0pCpDkCESMS6fZPN+91J0Em3eAgAASOVA=
- Thread-topic: [mdt-bpmn2.dev] PackageNotFoundException when trying to load XML (or XMI) from a InputStream
Perhaps the packages are not registered?
Typical UI-like plugins have some magic in their activators that registers the EMF packages to EMF.
Von: mdt-bpmn2.dev-bounces@xxxxxxxxxxx [mailto:mdt-bpmn2.dev-bounces@xxxxxxxxxxx] Im Auftrag von Bob Brodt
Gesendet: Freitag, 27. Februar 2015 17:17
An: BPMN2 Developers Mailing List
Betreff: Re: [mdt-bpmn2.dev] PackageNotFoundException when trying to load XML (or XMI) from a InputStream
I'm not sure what the problem is with your plugin, but I was able to get these files (and others) to load using the modelreader example plugin from the BPMN2 Modeler project .
The only difference I can see is that the modelreader code adds this before the load() call:
HashMap<Object, Object> options = new HashMap<Object, Object>();
this causes forward references to objects by their IDs to be deferred until the entire file is loaded, but this shouldn't be the reason why this code works and yours doesn't.
----- Original Message -----
> 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 ).
> These are the files I tried. (see also the links).
>  Atomic XML file
>  simple XML file
>  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!
>  https://ezcrypt.it/jKAn#eEmmCygtnxb6HSjJJ4tGsItP
>  https://ezcrypt.it/nKAn#RbsYGEfHkSrHcnrAfE1qQypF
>  https://ezcrypt.it/mKAn#AYlEUxSvpwyKQyAUzc5Pp5lB
>  https://ezcrypt.it/oKAn#CEcWAZv2FufWdcQzapeaf8Ad
> Jean Simard
> Research engineer at XWiki SAS
> Committer on the XWiki.org project
> mdt-bpmn2.dev mailing list
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
mdt-bpmn2.dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit