Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » org.eclipse.emf.ecore.xmi.IllegalValueException
org.eclipse.emf.ecore.xmi.IllegalValueException [message #622593] Wed, 27 June 2007 14:40
Andrew Jackson is currently offline Andrew JacksonFriend
Messages: 24
Registered: July 2009
Junior Member
Hi,

I get this exception caught and printed when i load a uml componnt model:
org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'null' is not
legal.
( file:///Users/andrewjackson/workspace/RDL_Project/model/Auct ionSystemArch/ArchCompDiargam.uml,
10, 21)

Below i provide my model, the code i use to load the model and i detail
what i observe when i debug the code.


-------------------

Here is the offending component model (generated using Magic draw):
https://www.cs.tcd.ie/~ajackso/Archive.zip

-------------------

It is loaded with the following code:

protected static void registerPathmaps(URI uri) {
URIConverter.URI_MAP.put(URI.createURI("pathmap://UML_LIBRARIES/"), uri
.appendSegment("libraries").appendSegment(""));
URIConverter.URI_MAP.put(URI.createURI("pathmap://UML_METAMODELS/"),
uri.appendSegment("metamodels").appendSegment(""));
URIConverter.URI_MAP.put(URI.createURI("pathmap://UML_PROFILES/"), uri
.appendSegment("profiles").appendSegment(""));
}

private FileManager() {

registerPathmaps(URI
.createURI(" jar:file:/Users/andrewjackson/Desktop/cartona-eclipse/plugin s/org.eclipse.uml2.uml.resources_2.1.0.v200705171545.jar!/ "));
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(
UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);

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

resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI,
UMLPackage.eINSTANCE);

}

public org.eclipse.uml2.uml.Package load(URI uri) {


org.eclipse.uml2.uml.Package package_ = null;

try {
Resource resource = resourceSet.getResource(uri, true);

package_ = (org.eclipse.uml2.uml.Package) EcoreUtil
.getObjectByType(resource.getContents(),
UMLPackage.Literals.PACKAGE);
} catch (WrappedException we) { ....}

-------------------
As far as i can see an exception is thrown at line 271 of the
ResourceSetImpl class and is caught resulting in the message show at the
start of this message. This message is the direct result of line 275 of
the ResourceSetImpl class.

Thanks in advance for your help,
Andrew
Previous Topic:using the uml2 code generator
Next Topic:Which packages in UML2 superstructure does Eclipse UML2 implement?
Goto Forum:
  


Current Time: Thu Apr 25 22:32:38 GMT 2024

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

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

Back to the top