[MWE2] Workflow execution fails randomly [message #659521] |
Mon, 14 March 2011 12:30 |
Tom Seidel 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 |
Tom Seidel 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.02564 seconds