Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » workflow runner going out of space (using xpand to generate code for gmf instance )
workflow runner going out of space [message #654347] Tue, 15 February 2011 10:34 Go to next message
Ravi Kiran is currently offline Ravi KiranFriend
Messages: 41
Registered: December 2010
Member
i am currently working on gmf .i am trying to invoke workflow.runner from my gmf context menu.
when i invoke workflow it's going out of memory. so i tried to debug it i found the following error.


execute workflow fails in the workflow runner.i found out that it was because of configuration errors in my workflow file
prepare(workFlowFile, theMonitor, theParams);

can you point out from my workflow file?

all my parameters seem to be fine but i m not sure where something has gone wrong.


xpand workflow works fine normally. when i try to invoke from gmf plugin its going out of memory

follwing is the error dump
------------------------------------------------------------ --------

Error while logging event loop exception:
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:469)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(Bund leLoader.java:338)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1197)
at org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:272)
at org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
at org.eclipse.m2t.type.emf.EmfRegistryMetaModel.allPackages(Em fRegistryMetaModel.java:210)
at org.eclipse.m2t.type.emf.EmfRegistryMetaModel$2.createNew(Em fRegistryMetaModel.java:182)
at org.openarchitectureware.workflow.util.Cache.get(Cache.java: 25)
at org.eclipse.m2t.type.emf.EmfRegistryMetaModel.getTypeForName (EmfRegistryMetaModel.java:238)
at org.openarchitectureware.expression.TypeSystemImpl.internalG etTypeForName(TypeSystemImpl.java:185)
at org.openarchitectureware.expression.TypeSystemImpl.getTypeFo rName(TypeSystemImpl.java:235)
at org.openarchitectureware.expression.TypeSystemImpl.getTypeFo rName(TypeSystemImpl.java:212)
at org.eclipse.m2t.type.emf.EmfRegistryMetaModel.getTypeForETyp edElement(EmfRegistryMetaModel.java:356)
at org.eclipse.m2t.type.emf.EClassType.getContributedFeatures(E ClassType.java:65)
at org.openarchitectureware.type.AbstractTypeImpl.getAllFeature s(AbstractTypeImpl.java:62)
at org.openarchitectureware.type.AbstractTypeImpl$1.createNew(A bstractTypeImpl.java:84)
at org.openarchitectureware.type.AbstractTypeImpl$1.createNew(A bstractTypeImpl.java:1)
Logging exception:
------------------------------------------------------------ -----


------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ ------
<?xml version="1.0"?>
<workflow>
<property name="model" value="C:\\Documents and Settings\\rtiragat\\runtime-EclipseApplication\\Automation\\ default.mist " />
<!--<property name="model" value="Automation/default.mist_diagram" />-->
<property name="src-gen" value="src-gen" />



<!-- set up EMF for standalone execution -->
<bean class="org.eclipse.mwe.emf.StandaloneSetup" >
<platformUri value=".."/>
<registerGeneratedEPackage value="mist.MistPackage"/>
<!-- Load GMF Notation package Don't load from model as it gives errors -->
<registerGeneratedEPackage value="org.eclipse.gmf.runtime.notation.NotationPackage"/>
</bean>

<!-- instantiate metamodel -->
<bean id="mm_emf" class="org.eclipse.m2t.type.emf.EmfRegistryMetaModel"/>
<!-- load model and store it in slot 'model' -->
<!--<component class="org.eclipse.mwe.emf.Reader">-->
<component class="org.openarchitectureware.emf.XmiReader">
<modelFile value="${model}"/>

<outputSlot value="model"/>
<firstElementOnly value="true"/>

<!--<model value="${model}"/>-->

<!-- <uri value="platform:/resource/${model}" />-->
<!--<modelSlot value="model" />-->
</component>

<!-- check model -->
<component class="oaw.check.CheckComponent">
<metaModel idRef="mm_emf"/>
<checkFile value="metamodel::Checks" />
<emfAllChildrenSlot value="model" />
</component>

<!-- generate code -->
<component class="org.openarchitectureware.xpand2.Generator">
<metaModel idRef="mm_emf"/>
<expand
value="template::Template::main FOR model" />
<outlet path="${src-gen}" >
<postprocessor class="org.openarchitectureware.xpand2.output.JavaBeautifier " />
</outlet>
</component>
</workflow>




workflow invoking
------------------------------------------------------------ ----
WorkflowRunner runner = new WorkflowRunner();
Bundle bundle=Platform.getBundle("com.genesyslabs.sipserver.mist.generator ");
URL wfUrl = bundle.getEntry("src/workflow/generator.oaw");
String wfFile = "";



try {

wfFile = FileLocator.toFileURL(wfUrl).getFile();
mb.setMessage(wfFile);

mb.open();
Map<String, String> properties = new HashMap<String, String>();
Map<String,?> slotMap = new HashMap<String,Object>();
//mb.setMessage(PlatformUI.getWorkbench().getActiveWorkbench Window().getActivePage().getActiveEditor().getTitle());
path=getDiagramFile(event);
properties.put("model","C:\\Documents and Settings\\rtiragat\\runtime-EclipseApplication\\Automation\\ default.mist ");
//mb.setMessage(path+"---diagram file path---");
//mb.open();
if(path!=null)
{
if(runner.prepare(wfFile,new org.openarchitectureware.workflow.monitor.NullProgressMonito r(),properties))
{
//isSuccess=runner.run(wfFile,new org.openarchitectureware.workflow.monitor.NullProgressMonito r(), properties, null);
//isSuccess=runner.run("C:\\Documents and Settings\\rtiragat\\workspace\\com.genesyslabs.sipserver.mis t.generator\\src\\workflow\\generator.oaw ",new org.openarchitectureware.workflow.monitor.NullProgressMonito r(), properties, null);
isSuccess=runner.run("C:/Documents and Settings/rtiragat/workspace/com.genesyslabs.sipserver.mist.g enerator/src/workflow/generator.oaw ",new org.openarchitectureware.workflow.monitor.NullProgressMonito r(), properties,slotMap);
}

}

if(isSuccess)
{

mb.setMessage("code generation succesfull !!!!");
}
else
{
mb.setMessage("code generation unsuccesfull !!!!");

}


mb.open();

}


catch (Exception e)
{
e.printStackTrace();
}

------------------------------------------------------------ ----
Re: workflow runner going out of space [message #654444 is a reply to message #654347] Tue, 15 February 2011 19:47 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14736
Registered: July 2009
Senior Member
hi,

why do you call StandaloneSetup in a workflow what runs within eclipse - does it work when you remove it?

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: workflow runner going out of space [message #654507 is a reply to message #654444] Wed, 16 February 2011 05:39 Go to previous messageGo to next message
Ravi Kiran is currently offline Ravi KiranFriend
Messages: 41
Registered: December 2010
Member
Hi chris

thanks for replying.

i am not completely clear on this. can you point out where i require to make change.

if i remove standalonesetup bean. what should i replace it with?



Thanks
Ravi
Re: workflow runner going out of space [message #654518 is a reply to message #654507] Wed, 16 February 2011 07:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14736
Registered: July 2009
Senior Member
Hi,

i said does it work when you remove it? so just send it to /dev/null

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: workflow runner going out of space [message #654539 is a reply to message #654518] Wed, 16 February 2011 09:14 Go to previous messageGo to next message
Ravi Kiran is currently offline Ravi KiranFriend
Messages: 41
Registered: December 2010
Member
hi chris

sorry for troubling you again

i hardly have any knowledge about creating a workflow.

i don't know how i should send it to /dev/null
i was thinking like if that bean class should be changed to something else
like some other class and not stanalonesetup class

so can you can make changes in my workflow and give it in the reply ?


Thanks for your patience.

Re: workflow runner going out of space [message #654545 is a reply to message #654539] Wed, 16 February 2011 09:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14736
Registered: July 2009
Senior Member
Hi,

is it so hard to simply delete / remove / eraze / kill /....
<bean class="org.eclipse.mwe.emf.StandaloneSetup" >
<platformUri value=".."/>
<registerGeneratedEPackage value="mist.MistPackage"/>
<!-- Load GMF Notation package Don't load from model as it gives errors -->
<registerGeneratedEPackage value="org.eclipse.gmf.runtime.notation.NotationPackage"/>
</bean>

from you worjkflow?

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: workflow runner going out of space [message #654583 is a reply to message #654545] Wed, 16 February 2011 12:03 Go to previous messageGo to next message
Ravi Kiran is currently offline Ravi KiranFriend
Messages: 41
Registered: December 2010
Member
hi chris

thanks for reply

i have deleted and tried that before but it gives me error
but i have one doubt if we remove that how does the workflow know where to take emf model (ecore file)?

here is error

it works fine if i include those lines back again.
the problem is invoking from gmf context menu

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

9952 ERROR WorkflowRunner - org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri 'http://mist.ecore' not found. (file:/C:/Documents%20and%20Settings/rtiragat/runtime-Eclips eApplication/Automation/default.mist, 2, 186)
org.openarchitectureware.workflow.ConfigurationException: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri 'http://mist.ecore' not found. (file:/C:/Documents%20and%20Settings/rtiragat/runtime-Eclips eApplication/Automation/default.mist, 2, 186)
at org.openarchitectureware.emf.XmiReader.invoke(XmiReader.java :139)
at org.openarchitectureware.workflow.container.CompositeCompone nt.internalInvoke(CompositeComponent.java:129)
at org.openarchitectureware.workflow.container.CompositeCompone nt.invoke(CompositeComponent.java:112)
at org.openarchitectureware.workflow.WorkflowRunner.executeWork flow(WorkflowRunner.java:380)
at org.openarchitectureware.workflow.WorkflowRunner.run(Workflo wRunner.java:261)
at org.openarchitectureware.workflow.WorkflowRunner.main(Workfl owRunner.java:213)
Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri 'http://mist.ecore' not found. (file:/C:/Documents%20and%20Settings/rtiragat/runtime-Eclips eApplication/Automation/default.mist, 2, 186)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL oadImpl.java:83)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:191)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1494)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1282)
at org.openarchitectureware.emf.XmiReader.invoke(XmiReader.java :136)
... 5 more
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://mist.ecore' not found. (file:/C:/Documents%20and%20Settings/rtiragat/runtime-Eclips eApplication/Automation/default.mist, 2, 186)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2591)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2422)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1299)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1468)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:169)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
... 9 more
------------------------------------------------------------

Re: workflow runner going out of space [message #654590 is a reply to message #654583] Wed, 16 February 2011 12:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14736
Registered: July 2009
Senior Member
Hi,

first - the workflow may look different if you run it by rightclick/standalone (then it may contain the standalonesetup) or at runtime / from gmf - then ist should wirk without.

did you check if the 'http://mist.ecore' package is registered to your runtime?

can you share a complete runnable example?

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com

[Updated on: Wed, 16 February 2011 12:14]

Report message to a moderator

Re: workflow runner going out of space [message #655062 is a reply to message #654590] Fri, 18 February 2011 08:45 Go to previous messageGo to next message
Ravi Kiran is currently offline Ravi KiranFriend
Messages: 41
Registered: December 2010
Member
Hi chris

it's working fine now. i am launching as a product it works fine but if i launch as application it not working

i still didn't understand why it's not working their


Regards
Ravi
Re: workflow runner going out of space [message #657898 is a reply to message #655062] Fri, 04 March 2011 14:43 Go to previous message
Ravi Kiran is currently offline Ravi KiranFriend
Messages: 41
Registered: December 2010
Member
Hi chris

i found out the error Very Happy


i didn't include the src folder in the binary build of the required plug in so i was not able to get the location

Regards
Ravi
Previous Topic:How to invoke a JET transform
Next Topic:acceleo - cast of variables
Goto Forum:
  


Current Time: Thu Dec 12 20:01:58 GMT 2024

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

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

Back to the top