Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Error when trying generated ecore file
Error when trying generated ecore file [message #1746455] Sat, 29 October 2016 15:14 Go to next message
C. Santos is currently offline C. SantosFriend
Messages: 32
Registered: September 2015
Member
Hi all,

When I click on my .emf file with the right click on mouse, and then Eugenia > Generate Ecore Model I always get this error:

index.php/fa/27455/0/

"An internal error occurred during: "Generating all GMF models".
org/eclipse/emf/emfatic/core/generator/ecore/EcoreGenerator"

Someone can help me on this? Why this error is showing up every time?

I'm using Eclipse Mars.2 Release (4.5.2) on Mac.

Cheers
  • Attachment: error.png
    (Size: 35.15KB, Downloaded 973 times)
Re: Error when trying generated ecore file [message #1746456 is a reply to message #1746455] Sat, 29 October 2016 15:21 Go to previous messageGo to next message
Eclipse UserFriend
1. Could you please provide an example metamodel .emf file that causes the problem?

2. Could you please take some working emf examples from the Epsilon website to verify that the problem is not .emf file dependent?
Re: Error when trying generated ecore file [message #1746457 is a reply to message #1746456] Sat, 29 October 2016 15:33 Go to previous messageGo to next message
C. Santos is currently offline C. SantosFriend
Messages: 32
Registered: September 2015
Member
Hi,

with this .emf I get the same error:

@namespace(uri="filesystem", prefix="filesystem")
@gmf
package filesystem;

@gmf.diagram
class Filesystem {
    val Drive[*] drives;
    val Sync[*] syncs;
}

class Drive extends Folder {

}

class Folder extends File {
    @gmf.compartment
    val File[*] contents;
}

class Shortcut extends File {
    @gmf.link(target.decoration="arrow", style="dash")
    ref File target;
}

@gmf.link(source="source", target="target", style="dot", width="2")
class Sync {
    ref File source;
    ref File target;
}

@gmf.node(label = "name")
class File {
    attr String name;
}


And this is my .emf file:

@namespace(uri="crystal", prefix="crystal")
package crystal;

@gmf.diagram(foo="bar", rcp="false", onefile="true", diagram.extension="crystal")
class Crystal {
	val Transition[*] transitions;
	val Procedure[*] procedures;
	val Function[*] functions;
	val AnonymousBlock[*] blocks;
}

//Subprograms
@gmf.node(figure="rectangle", border.width="1", label.readOnly = "true")
abstract class Subprograms{
	attr String name;
}

@gmf.node(label="name", label.text="Procedure", border.color="255,13,13") //vermelho
class Procedure extends Subprograms {
	@gmf.compartment
	val Parameters[*] declarativePart;
	@gmf.compartment
	val Parameters[*] parameters;
	@gmf.compartment
	val Statements[*] executablePart;
}

@gmf.node(label="name", label.text="Function", border.color="25,191,108") //azul	
class Function extends Subprograms {
	@gmf.compartment
	val Parameters[*] declarativePart;
	@gmf.compartment
	val Parameters[*] parameters;
	@gmf.compartment
	val Parameters[1] returnPart;
	@gmf.compartment
	val Statements[*] executablePart;
}

@gmf.node(label="name", label.text="Anonymous Block", border.color="43,106,215", border.style="dash") //verde
class AnonymousBlock extends Subprograms {
	@gmf.compartment
	val Parameters[*] declarativePart;
	@gmf.compartment
	val Statements[*] executablePart;
}

//Parameters
@gmf.node(label="name", figure="rectangle", border.width="1", label.icon="true",label.readOnly = "true", label.placement="internal")
abstract class Parameters{
	attr String name;
	attr ParameterType type;
}

@gmf.node(label.text="Data Type")
class DataType extends Parameters{
	attr String className ="DataType";
	attr DataTypeOptions options;
	attr int precision = 1;
	attr int scale = 0;
}

@gmf.node(label.text="Collection")
class Collections extends Parameters{
	attr String className ="Collection";
	attr String code = "TYPE name IS TABLE OF NUMBER INDEX BY VARCHAR2(20)";
	attr String typeName = "collectionTypeName";
}

@gmf.node(label.text="Record")
class Records extends Parameters{
	attr String className ="Record";
	attr String code = "TYPE recordType IS RECORD (id number(5), name varchar2(25), lastName tableA.last_name%type)";
	attr String typeName = "recordTypeName";
}

@gmf.node(label.text="Cursor")
class Cursor extends Parameters {
	attr String className ="Cursor";
	attr String cursorQuery = "selectStatement";
}

//Statements
@gmf.node(label="description", label.icon="true", label.placement="internal")
abstract class Statements{
	attr String description = "Description";
	attr boolean isStart;
}

@gmf.node(figure="rectangle")
class Exception extends Statements{
	attr String className ="Exception";
	attr String code = "EXCEPTION WHEN no_data_found THEN DBMS_OUTPUT.PUT_LINE('There aren't data registred')";
}

@gmf.node(figure="rectangle")
class If extends Statements{
	attr String className ="If";
	attr String condition = "Type the IF condition";
	
	@gmf.compartment
	val Statements[*] if;
	@gmf.compartment
	val Statements[*] else;
}

@gmf.node(figure="rectangle")
class Case extends Statements{
	attr String className ="Case";
	
	@gmf.compartment
	val Selector[*] cases;
}

@gmf.node(figure="rectangle", label="description", label.icon="true", label.placement="internal")
class Selector {
	attr String className = "Selector";
	attr String condition = "Type the condition for this Selector";
	attr String description = "Description";
	
	@gmf.compartment
	val Statements[*] caseStatements;
}

@gmf.node(figure="rectangle")
class Insert extends Statements{
	attr String className ="Insert";
	attr String code = "INSERT INTO tableA (id, name) VALUES (1, 'example')";
}

@gmf.node(figure="rectangle")
class Update extends Statements{
	attr String className ="Update";
	attr String code = "UPDATE tableA SET name = 'example' WHERE id = 1";
}

@gmf.node(figure="rectangle")
class Delete extends Statements{
	attr String className ="Delete";
	attr String code = "DELETE FROM tableA WHERE ID = 1";
}

@gmf.node(figure="rectangle")
class Select extends Statements{
	attr String className ="Select";
	attr String code = "SELECT * FROM tableA WHERE id = 1";
}

@gmf.node(figure="rectangle")
class While extends Statements{
	attr String className ="While";
	attr String condition = "Type the WHILE condition";
	@gmf.compartment
	val Statements[*] whileStatements;
}

@gmf.node(figure="rectangle")
class For extends Statements{
	attr String className ="For";
	attr String counter = "Type the name of the FOR counter";
	attr ForCounter typeCounter;
	attr int lowestNumber = 0;
	attr int highestNumber = 0;

	@gmf.compartment
	val Statements[*] forStatements;
}

@gmf.node(figure="rectangle")
class Loop extends Statements{
	attr String className ="Loop";
	attr String breakCondition = "Type the break condition for LOOP";
	
	@gmf.compartment
	val Statements[*] loopStatements;
}

@gmf.node(figure="rectangle")
class Open extends Statements{
	attr String className ="Open";
	attr String cursorName = "cursorName";
}

@gmf.node(figure="rectangle")
class Fetch extends Statements{
	attr String className ="Fetch";
	attr String code = "FETCH cursorName INTO variableCursor";
}

@gmf.node(figure="rectangle")
class Close extends Statements{
	attr String className ="Close";
	attr String cursorName = "cursorName";
}

@gmf.node(figure="rectangle")
class CallProcedure extends Statements{
	attr String className ="CallProcedure";
	attr String nameSubroutine;
}

@gmf.node(figure="rectangle")
class CallFunction extends Statements{
	attr String className ="CallFunction";
	attr String nameSubroutine;
}

@gmf.link(source="source", target="target", incoming="true", target.decoration="arrow", color="0,0,0", width="1")
class Transition{
    attr String name = "Connection";
    ref Statements source;
    ref Statements target;
}

enum ParameterType {
    IN = 0;
    OUT = 1;
    IN_OUT = 2;
}

enum ForCounter {
	NORMAL = 0;
	REVERSE = 1;
}

enum DataTypeOptions {
	CHAR = 0;
	NCHAR = 1;
	NVARCHAR2 = 2;
	VARCHAR2 = 3;
	LONG = 4;
	RAW = 5;
	LONG_RAW = 6;
	NUMBER = 7; //can modify the precision and scale
	NUMERIC = 8; //can modify the precision and scale
	FLOAT = 9;
	DEC = 10; //can modify the precision and scale
	DECIMAL = 11; //can modify the precision and scale
	INTEGER = 12;
	INT = 13;
	SMALLINT = 14;
	REAL = 15;
	DOUBLE = 16;
	DATE = 17;
	TIMESTAMP_WITH_TIME_ZONE = 18;
	TIMESTAMP_WITH_LOCAL_TIME_ZONE = 19;
	INTERVAL_YEAR_TO_MONTH = 20;
	INTERVAL_DAY_TO_SECOND = 21;
	BFILE = 22;
	BLOB = 23; 
	CLOB = 24;
	NCLOB = 25;
	ROWID = 26;
	UROWID = 27;
}
Re: Error when trying generated ecore file [message #1746459 is a reply to message #1746457] Sat, 29 October 2016 15:55 Go to previous messageGo to next message
Eclipse UserFriend
Hmm, I have tried with both metamodels. They both work (In case you need it quickly, I put it in the attachment) in my IDE (Windows, Version: Mars.2 Release (4.5.2)). So, the problem should be something related to your Eclipse configuration.

Can we somehow get more detailed description of the error?
  • Attachment: Crystal.ecore
    (Size: 22.54KB, Downloaded 212 times)
Re: Error when trying generated ecore file [message #1746460 is a reply to message #1746459] Sat, 29 October 2016 16:05 Go to previous messageGo to next message
C. Santos is currently offline C. SantosFriend
Messages: 32
Registered: September 2015
Member
The details option just show me this message:

"An internal error occurred during: "Generating all GMF models".
org/eclipse/emf/emfatic/core/generator/ecore/EcoreGenerator"

And now I'm trying to click in my .ecore file and Eugenia > Generate GMF Editor and I'm get this error also:

index.php/fa/27457/0/

"Unhandled error
GC overhead limit exceeded"

Sad
  • Attachment: error2.png
    (Size: 57.80KB, Downloaded 850 times)
Re: Error when trying generated ecore file [message #1746461 is a reply to message #1746460] Sat, 29 October 2016 16:10 Go to previous messageGo to next message
Eclipse UserFriend
Cool, my guess is, if you increase the heap space of your JVM, then this problem may go away. In your Eclipse configuration file, find the file eclipse.ini and try to increase/set the heap space size. How to do is here: http://stackoverflow.com/questions/8600972/increasing-heap-space-in-eclipse-java-lang-outofmemoryerror .

You need to restart your Eclipse afterwards.
Re: Error when trying generated ecore file [message #1746462 is a reply to message #1746461] Sat, 29 October 2016 16:23 Go to previous messageGo to next message
C. Santos is currently offline C. SantosFriend
Messages: 32
Registered: September 2015
Member
The error

"Unhandled error
GC overhead limit exceeded"

was solved when I changed the heap space but the first one continues going on:

"An internal error occurred during: "Generating all GMF models".
org/eclipse/emf/emfatic/core/generator/ecore/EcoreGenerator"

Is it possible that this error involves something about gmf and eclipse versions ?
Re: Error when trying generated ecore file [message #1746520 is a reply to message #1746462] Mon, 31 October 2016 14:39 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi,

Is Emfatic installed in your Eclipse? If not, you should install it from http://download.eclipse.org/emfatic/update

Cheers,
Dimitris
Re: Error when trying generated ecore file [message #1746593 is a reply to message #1746520] Tue, 01 November 2016 14:29 Go to previous messageGo to next message
C. Santos is currently offline C. SantosFriend
Messages: 32
Registered: September 2015
Member
Hi Dimitris,

I'm not sure if this link is working because nothing is appearing to me:

index.php/fa/27470/0/

These are my installed softwares:

index.php/fa/27471/0/

Can you help me on this?

Cheers.
  • Attachment: emfatic.png
    (Size: 82.61KB, Downloaded 810 times)
  • Attachment: installed.png
    (Size: 355.24KB, Downloaded 857 times)
Re: Error when trying generated ecore file [message #1746610 is a reply to message #1746593] Tue, 01 November 2016 18:10 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Emfatic doesn't seem to be installed in your Eclipse instance. Does un-ticking the "Group items by category" in the first screen do the trick?

Cheers,
Dimitris
Re: Error when trying generated ecore file [message #1746612 is a reply to message #1746610] Tue, 01 November 2016 19:05 Go to previous message
C. Santos is currently offline C. SantosFriend
Messages: 32
Registered: September 2015
Member
Now it works. Thanks!

Cheers.
Previous Topic:problem with text file when opening the ecore as text file
Next Topic:Label attribute do not exist in class
Goto Forum:
  


Current Time: Thu Apr 18 02:12:45 GMT 2024

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

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

Back to the top