Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [MWE2] Workflow execution fails randomly
[MWE2] Workflow execution fails randomly [message #659521] Mon, 14 March 2011 12:30 Go to next message
Tom Seidel is currently offline Tom SeidelFriend
Messages: 91
Registered: July 2009
Member
Hi,

I'm using MWE2 to execute some Xpand scripts for code-generation. This generation is triggered within another bundle. The problem is, that the workflow throws sometimes an exception, after a restart of Eclipse it works

I call the execution with:
final Map<String, String> args = new HashMap<String, String>();
        args.put("model", this.modelFile.getFullPath().toString());
        args.put("src-gen", this.projectProvider.getProject().getLocation().append("src")
                .toOSString());
 run = new WorkflowRunner().run(
                    "com/mycompany/myproject/studio/connectorgenerator/workflow/generator.mwe",
                    new ProgressMonitorAdapter(monitor), args, Collections.EMPTY_MAP);


and I get the following error-message:

[ERROR]: Couldn't find operation 'packageHeader(String)' for datatypes::Class.(Element: packageHeader(getGlobalVar("objectPrefix").toString()); Reported by: Generator: generating 'com::mycomp::myproject::studio::connectorgenerator::templat e::Template::main FOR model' => C:\DEV\Workspaces\runtime-New_configuration\test\src)
[ERROR]: Couldn't find operation 'packageHeader(String)' for datatypes::Class.(Element: EXPRESSION: packageHeader(getGlobalVar("objectPrefix").toString()); Reported by: Generator: generating 'com::mycomp::myproject::studio::connectorgenerator::templat e::Template::main FOR model' => C:\DEV\Workspaces\runtime-New_configuration\test\src)
[ERROR]: Couldn't find operation 'packageHeader(String)' for datatypes::Class.(Element: org.eclipse.internal.xpand2.ast.FileStatement@1d2f159; Reported by: Generator: generating 'com::mycomp::myproject::studio::connectorgenerator::templat e::Template::main FOR model' => C:\DEV\Workspaces\runtime-New_configuration\test\src)
[ERROR]: Couldn't find operation 'packageHeader(String)' for datatypes::Class.(Element: inputObjects : StructuredType; Reported by: Generator: generating 'com::mycomp::myproject::studio::connectorgenerator::templat e::Template::main FOR model' => C:\DEV\Workspaces\runtime-New_configuration\test\src)
[ERROR]: Couldn't find operation 'packageHeader(String)' for datatypes::Class.(Element: EXPAND inputObjects FOREACH requestObjects; Reported by: Generator: generating 'com::mycomp::myproject::studio::connectorgenerator::templat e::Template::main FOR model' => C:\DEV\Workspaces\runtime-New_configuration\test\src)
[ERROR]: Couldn't find operation 'packageHeader(String)' for datatypes::Class.(Element: main : Connector; Reported by: Generator: generating 'com::mycomp::myproject::studio::connectorgenerator::templat e::Template::main FOR model' => C:\DEV\Workspaces\runtime-New_configuration\test\src)
[ERROR]: Couldn't find operation 'packageHeader(String)' for datatypes::Class.(Element: EXPAND com::mycomp::myproject::studio::connectorgenerator::template ::Template::main FOR model; Reported by: Generator: generating 'com::mycomp::myproject::studio::connectorgenerator::templat e::Template::main FOR model' => C:\DEV\Workspaces\runtime-New_configuration\test\src)

Like already mentioned if I restart my target eclipse instance and execute it again, it's working, but that's also not guaranteed. Sometimes I can restart my eclipse-target 5 times and it's always working, so I'm even not able to reproduce this error.. How to resolve this issue?

Thanks in advance
Tom

Re: [MWE2] Workflow execution fails randomly [message #659548 is a reply to message #659521] Mon, 14 March 2011 14:37 Go to previous messageGo to next message
Tom Seidel is currently offline Tom SeidelFriend
Messages: 91
Registered: July 2009
Member
Ok, I guess I've found a solution, but it would be nice if somebody could confirm that.

My Generator-Extension file has a method like

String joinFields(StructuredType type, String suffix, connectorgenerator::Connector connector) : JAVA
	 com.mycompany.myproject.studio.connector.GeneratorUtils.joinFields(com.mycompany.myproject.studio.datatypes.StructuredType,  java.lang.String, com.mycompany.connectorgenerator.Connector)
;

The GeneratorUtil class is located in the same bundle like the ext file and uses StringUtil from org.apache.commons.lang. This dependency is created in the MANIFEST.MF of the bundle.

When the dependency was declared via Import-Package the Execution of the workflow did not work always, I've changed now the dependecy-declaration to require-bundle and it seems to work.

My question is: Could that be the reason for the above described problem? - If yes, it seems to me, that MWE has problems with OSGi. Is an execution of workflows in an OSGi-environment out of scope or probably not recommended?

Thanks
Tom
Re: [MWE2] Workflow execution fails randomly [message #659633 is a reply to message #659521] Mon, 14 March 2011 21:01 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Could it be that another plugin or version feels responsible to fulfil the import package requirement?

~Karsten


Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Previous Topic:[Xpand] super() equivalent for DEFINE methods?
Next Topic:[Xpand]define of the return type
Goto Forum:
  


Current Time: Thu Apr 18 23:59:59 GMT 2024

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

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

Back to the top