[ATL]Java Heap Space Error importing ECore Model [message #58014] |
Thu, 16 August 2007 15:03 |
Eclipse User |
|
|
|
Originally posted by: maximilian.weinhart.sdm.de
Hi,
I am complete new to ATL.
Explanation to attached Files:
StorageMModel.ecore : Metamodel (generated through reflective ecore
functions)
StorageMInstance.ecore : Instance of the Metamodel (generated through
reflective ecore functions)
NodesEdgesMModel.ecore : Metamodel of the model which should be generated in
future.
When i try to execute the transformation in eclipse a Java heap space-Error
occurs.
My storage2Visio.atl-File contains no rules. So normally a empty outputfile
should be generated, right ?
Because of the stack-trace I think the error is in EMF.
I generated the ecore-Models by using the reflective-functions of ecore.
And it is possible to read both models StorageMModel.ecore (metamodel) and
StorageMInstance (modelinstance) back in via ECore like this :
// create resource set and resource
ResourceSet resourceSet = new ResourceSetImpl();
// Register XML resource factory
resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put( "xmi",
resFactImpl);
Resource resourceModelLoad = resourceSet.createResource(
URI.createFileURI( sourceFile ) );
Map options = new HashMap();
resourceModelLoad.load( options );
EPackage rootPackage = (EPackage) resourceModelLoad.getContents().get(0);
So I think the format of the ECore-models should be correct.
What
|
|
|
Re: [ATL]Java Heap Space Error importing ECore Model [message #58144 is a reply to message #58014] |
Fri, 17 August 2007 11:11 |
Eclipse User |
|
|
|
Originally posted by: maximilian.weinhart.sdm.de
Hi,
I guess I have found out why the Error occured.
I defined twosided containments (means two references wich both have
containment=true and belong to the same relation),
wich is obviously not allowed. So i think that leads to a neverending loop.
And so a Java Heap Error occurs.
But i think it would be nice to detect such loops an not simply let Java
fill up the heap.
I don
|
|
|
|
Powered by
FUDForum. Page generated in 0.01873 seconds