Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] cannot start workflow from a plugin
[Xpand] cannot start workflow from a plugin [message #718924] Thu, 25 August 2011 15:49 Go to next message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
hi to all
i'm trying to start my xpand workflow from a plugin (using the org.eclipse.emf.mwe.core.WorkflowRunner)
the mwe-file is in the plugin-project (like all other things i need for the codegen)
when i start the mwe-file by rigth click all runs fine (the same when i start it from code in the plugin) but when i want invoke it from the plugin nothing happens no errors just false from the workflow.run(...)
thats my manifest-file:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Ui
Bundle-SymbolicName: de.ubt.ai1.uml.codegen.ui; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: de.ubt.ai1.uml.codegen.ui.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.jface.text,
org.eclipse.ui.editors,
org.eclipse.ui.navigator,
org.eclipse.ui.navigator.resources,
org.eclipse.ui.ide,
org.eclipse.ui.intro,
org.eclipse.ui.intro.universal,
org.eclipse.ui.console,
org.eclipse.jdt.ui,
org.eclipse.swt,
org.eclipse.jface,
org.eclipse.ui.workbench,
org.eclipse.jdt.core;bundle-version="3.5.0",
org.eclipse.xtend.profiler;resolution:=optional,
org.apache.commons.logging,
org.apache.log4j;resolution:=optional,
com.ibm.icu;bundle-version="4.0.1",
org.antlr.runtime;bundle-version="3.0.0",
org.eclipse.core.runtime;bundle-version="3.5.0",
org.eclipse.emf.mwe.utils;bundle-version="0.7.0",
org.eclipse.emf.ecore.xmi;bundle-version="2.5.0",
org.eclipse.jface.text;bundle-version="3.5.0",
org.eclipse.xpand;bundle-version="0.7.0",
org.eclipse.xtend;bundle-version="0.7.0",
org.eclipse.xtend.typesystem.emf;bundle-version="0.7.0",
org.eclipse.xtend.backend;bundle-version="1.0.0";resolution:=optional,
org.eclipse.xtend.middleend.xpand;bundle-version="1.0.0";resolution:=optional,
org.eclipse.xtend.middleend.xtend;bundle-version="1.0.0";resolution:=optional,
org.eclipse.xtend.typesystem.uml2;bundle-version="1.0.1",
org.eclipse.ocl;bundle-version="3.0.2",
org.eclipse.ocl.ecore;bundle-version="3.0.2",
org.eclipse.ocl.uml;bundle-version="3.0.2",
org.eclipse.xtend.util.stdlib;bundle-version="1.0.1",
org.eclipse.swt;bundle-version="3.6.2"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

a picture is appended which shows the structure of my plugin-project

thanks for any help
greetings
  • Attachment: pTest.png
    (Size: 41.00KB, Downloaded 323 times)
Re: [Xpand] cannot start workflow from a plugin [message #718952 is a reply to message #718924] Thu, 25 August 2011 16:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
Hi,

debugging does not help? who you you exactly "start it from code in the plugin"?

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Xpand] cannot start workflow from a plugin [message #718967 is a reply to message #718952] Thu, 25 August 2011 16:48 Go to previous messageGo to next message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
thanks for the reply
while debugging i see, that the issue.hasErrors == true
i will step through it completlely now
stoehm
Re: [Xpand] cannot start workflow from a plugin [message #718974 is a reply to message #718967] Thu, 25 August 2011 16:56 Go to previous messageGo to next message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
ah i found the error, it is:

[ERROR]: Error creating instance of type 'org.eclipse.xtend.typesystem.uml2.Setup' : java.lang.IllegalStateException: Missing required plugin 'org.eclipse.uml2.uml.resources' in classpath.(Element: bean bean class='org.eclipse.xtend.typesystem.uml2.Setup' in C:\Users\s1stmatt\Downloads\workspace\de.ubt.ai1.uml.codegen.ui\src\workflow\gen.mwe:14; Reported by: -UNKNOWN-)

but this is strange: in my manifest is already org.eclipse.xtend.middleend.xtend and when i add .Setup it leads to an error (in my manifest there is a warning next to org.eclipse.xtend.typesystem.uml2 that it cannot be resolved), so i have no idea what i have to do

greetings
stoehm

Re: [Xpand] cannot start workflow from a plugin [message #718976 is a reply to message #718974] Thu, 25 August 2011 17:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
So you have bot
org.eclipse.xtend.typesystem.uml2 and org.eclipse.uml2.uml.resources as deps in the manifest
and uml2 extender sdk installed in your eclipse?

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Xpand] cannot start workflow from a plugin [message #718985 is a reply to message #718976] Thu, 25 August 2011 17:30 Go to previous messageGo to next message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
hello christian
thanks a lot so far for your help
yes i have installed the uml2 extender sdk and both depencies are in my manifest (without warnings, the warning was in another line)
but there is still the error:

[ERROR]: Error creating instance of type 'org.eclipse.xtend.typesystem.uml2.Setup' : java.lang.IllegalStateException: Missing required plugin 'org.eclipse.uml2.uml.resources' in classpath.(Element: bean bean class='org.eclipse.xtend.typesystem.uml2.Setup' in C:\Users\s1stmatt\Downloads\workspace\de.ubt.ai1.uml.codegen.ui\src\workflow\gen.mwe:14; Reported by: -UNKNOWN-)

maybe i have to put something else in the classpath from the runtime window in the manifest-file?

greetings
stoehm
Re: [Xpand] cannot start workflow from a plugin [message #718990 is a reply to message #718985] Thu, 25 August 2011 17:59 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
http://www.openarchitectureware.org/forum/viewtopic.php?forum=2&showtopic=6628&highlight=\\\'org.eclipse.uml2.uml.resources

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Xpand] cannot start workflow from a plugin [message #719168 is a reply to message #718990] Fri, 26 August 2011 08:55 Go to previous messageGo to next message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
hi christian
thanks a lot, the problem with classpath error dissapeared now, but still i can't run the workflow, debugging leads to, that configOK == true and the errorsize in issues ==0 but when i step further into executeWorkflow trying to call

workflow.invoke(wfContext, monitor, issues);

does not work so again the run-method returns false, debugging the invoke-method says nothing to me so maybe you have any idea what could be wrong?

another problem is, that you need the path of the workflowFile as a String. for testing i set the absolut path from the mwe-file. but later that can't work, any idea what i have to do there

greetings
stoehm

[Updated on: Fri, 26 August 2011 08:59]

Report message to a moderator

Re: [Xpand] cannot start workflow from a plugin [message #719177 is a reply to message #719168] Fri, 26 August 2011 09:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
No, can you share a minimal reproducing example? Regards Christian

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Fri, 26 August 2011 09:19]

Report message to a moderator

Re: [Xpand] cannot start workflow from a plugin [message #719184 is a reply to message #719177] Fri, 26 August 2011 09:45 Go to previous messageGo to next message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
trying to make a minimal reproducing example i realized, that now no workflow is running at all
we have put the org.eclipse.uml2.uml.resources into the workspace and changed the manifest-file into his:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.uml2.uml.resources; singleton:=true
Bundle-Version: 3.1.100.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.uml2.uml;bundle-version="[3.0.0,4.0.0)"
Export-Package: libraries,metamodels,profiles

trying to start any workflow i get this:

1433 ERROR VisitorCreator - java.lang.IllegalStateException: Missing required plugin 'org.eclipse.uml2.uml.resources' in classpath.
java.lang.RuntimeException: java.lang.IllegalStateException: Missing required plugin 'org.eclipse.uml2.uml.resources' in classpath.
at org.eclipse.emf.mwe.internal.core.ast.util.InjectorSimple.setValue(InjectorSimple.java:35)
at org.eclipse.emf.mwe.internal.core.ast.util.VisitorCreator.visitSimpleParamAST(VisitorCreator.java:203)
at org.eclipse.emf.mwe.internal.core.ast.util.VisitorBase.visit(VisitorBase.java:49)
at org.eclipse.emf.mwe.internal.core.ast.AbstractASTBase.accept(AbstractASTBase.java:44)
at org.eclipse.emf.mwe.internal.core.ast.util.VisitorCreator.createBean(VisitorCreator.java:157)
at org.eclipse.emf.mwe.internal.core.ast.util.VisitorCreator.visitComponentAST(VisitorCreator.java:118)
at org.eclipse.emf.mwe.internal.core.ast.util.VisitorBase.visit(VisitorBase.java:37)
at org.eclipse.emf.mwe.internal.core.ast.AbstractASTBase.accept(AbstractASTBase.java:44)
at org.eclipse.emf.mwe.internal.core.ast.util.VisitorCreator.createBean(VisitorCreator.java:157)
at org.eclipse.emf.mwe.internal.core.ast.util.VisitorCreator.visitComponentAST(VisitorCreator.java:118)
at org.eclipse.emf.mwe.internal.core.ast.util.VisitorBase.visit(VisitorBase.java:37)
at org.eclipse.emf.mwe.internal.core.ast.AbstractASTBase.accept(AbstractASTBase.java:44)
at org.eclipse.emf.mwe.internal.core.ast.util.WorkflowFactory.parseInitAndCreate(WorkflowFactory.java:74)
at org.eclipse.emf.mwe.internal.core.ast.util.WorkflowFactory.parseInitAndCreate(WorkflowFactory.java:52)
at org.eclipse.emf.mwe.core.WorkflowRunner.prepare(WorkflowRunner.java:332)
at org.eclipse.emf.mwe.core.WorkflowRunner.run(WorkflowRunner.java:290)
at org.eclipse.emf.mwe.core.WorkflowRunner.main(WorkflowRunner.java:241)
Caused by: java.lang.IllegalStateException: Missing required plugin 'org.eclipse.uml2.uml.resources' in classpath.
at org.eclipse.xtend.typesystem.uml2.Setup.setStandardUML2Setup(Setup.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.emf.mwe.internal.core.ast.util.InjectorSimple.setValue(InjectorSimple.java:33)
... 16 more
1446 ERROR WorkflowRunner - [ERROR]: Error creating instance of type 'org.eclipse.xtend.typesystem.uml2.Setup' : java.lang.IllegalStateException: Missing required plugin 'org.eclipse.uml2.uml.resources' in classpath.(Element: bean bean class='org.eclipse.xtend.typesystem.uml2.Setup' in C:/Users/s1stmatt/Downloads/workspace/my.generator.project/src/workflow/gen.mwe:14; Reported by: -UNKNOWN-)
1446 ERROR WorkflowRunner - Workflow interrupted because of configuration errors.

but again the org.eclipse.uml2.uml.resources is in the depencies of the manifest

greetings stoehm
Re: [Xpand] cannot start workflow from a plugin [message #719188 is a reply to message #719184] Fri, 26 August 2011 10:04 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
Hi, still the question? Did you use the fragment as the oaw forum
supposes?

Regards Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Xpand] cannot start workflow from a plugin [message #719197 is a reply to message #719188] Fri, 26 August 2011 11:09 Go to previous messageGo to next message
st oehm is currently offline st oehmFriend
Messages: 79
Registered: October 2009
Member
thanks so far for the help. now i tried it with fragments too. but the strange thing is when the org.eclipse.uml2.uml.resources is in the workspace no workflow works. when it is not in the workspace the fragment is complaining that its host is missing (maybe something is wrong with the fragment i'm not so common with this). for now i give it up maybe i come back to the problem later

greetings stoehm
Re: [Xpand] cannot start workflow from a plugin [message #719274 is a reply to message #719197] Fri, 26 August 2011 15:04 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
Hi,

you can easily create the fragment plugin using the wizard. i had no problem to create this one with Eclipse Indigo and Uml2 installed

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Fragment
Bundle-SymbolicName: test.fragment
Bundle-Version: 1.0.0.qualifier
Fragment-Host: org.eclipse.uml2.uml.resources;bundle-version="3.1.100"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: libraries,metamodels,profiles



~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:[Acceleo 3]Decision outgoing are switching
Next Topic:[Acceleo 3.x] Problem exporting Acceleo project as plugin
Goto Forum:
  


Current Time: Tue Apr 16 10:50:31 GMT 2024

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

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

Back to the top