[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt] Re: [UML2] how to load UML_PRIMITIVE_TYPES_LIBRARY

You were right, my Tomcat used the wrong libs.

Thanks,
Werner

James Bruck wrote:
UML2 2.2.0 is dependent on EMF 2.4. It looks like you have incompatible versions.

The download page indicates all the proper depencies ... http://www.eclipse.org/modeling/mdt/downloads/?project=uml2

- James

"Werner Schindling" <w.schindling@xxxxxxxxxxxx> wrote in message news:g7ho0p$i4j$1@xxxxxxxxxxxxxxxxxxxx
Hello there!

I have a problem with the same code, also trying to load resources from a standalone application.

Jinhui schrieb:
RESOURCE_SET.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
Map uriMap = RESOURCE_SET.getURIConverter().getURIMap();


Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("uml", new UMLResourceFactoryImpl());


Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl());

Resource resource = RESOURCE_SET.getResource(uri, true);
The code above gives me a

java.lang.ClassCastException: org.eclipse.uml2.uml.internal.resource.UMLResourceFactoryImpl cannot be cast to org.eclipse.emf.ecore.resource.Resource$Factory

which seems strange, since UMLResourceFactoryImpl implements Resource.Factory ...
I use the plugin versions EMF SDK 2.4 (2008/06/09) and UML2 2.1.0 (2008/05/13). Are these incompatible? They are the latest available versions ...