Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » QVTo transformation from command line
QVTo transformation from command line [message #1792433] Tue, 17 July 2018 23:42 Go to next message
ashrafur rahman is currently offline ashrafur rahmanFriend
Messages: 21
Registered: May 2018
Junior Member
Hello,

There are many posts about this topic in this forum. I tried all of them without any success.
I want to run qvto from the terminal without eclipse.
I tried this:
https://wiki.eclipse.org/QVTOML/Examples/InvokeInJava

But it shows the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/ocl/EvaluationHaltedException
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.eclipse.m2m.qvt.oml.TransformationExecutor.<init>(TransformationExecutor.java:86)
	at comrun.main(comrun.java:26)
Caused by: java.lang.ClassNotFoundException: org.eclipse.ocl.EvaluationHaltedException
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 14 more


Re: QVTo transformation from command line [message #1792437 is a reply to message #1792433] Wed, 18 July 2018 05:19 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6538
Registered: July 2009
Senior Member
Hi

You say you want to run QVTo from the command line. I am not aware of a standard main() so that is not supported. There is an Ant task that I don't recommend.

You reference an example that is for standalone execution and indeed that seems to be what you you are doing with comrun.main. This approach is fully supported.

The NoClassDefFoundError looks like a standard Java bad-classpath bug. Setting these up is difficult, you either just add them iteratively and rediscover the path with each new Eclipse release, or use the MANIFEST.MF to do it for you - really easy.

In your case, the standard message tells you that the JAR containing org.eclipse.ocl.EvaluationHaltedException is not on the classpath. (It is the org.eclipse.ocl plugin).

Regards

Ed Willink
Re: QVTo transformation from command line [message #1792444 is a reply to message #1792437] Wed, 18 July 2018 07:11 Go to previous messageGo to next message
ashrafur rahman is currently offline ashrafur rahmanFriend
Messages: 21
Registered: May 2018
Junior Member
Thanks for the reply. I will try to add each path iteratively.
Re: QVTo transformation from command line [message #1792447 is a reply to message #1792444] Wed, 18 July 2018 07:29 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6538
Registered: July 2009
Senior Member
Hi

You really should use the MANIFEST. Manually you have to specify the fully-qualified JARs which is really tedious and unstabvle. THe MANIFEST works it all out for you.

Regards

Ed Willink
Re: QVTo transformation from command line [message #1792448 is a reply to message #1792447] Wed, 18 July 2018 07:41 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6538
Registered: July 2009
Senior Member
Hi

Perhaps https://bugs.eclipse.org/bugs/show_bug.cgi?id=537126 addresses your use case.

Regards

Ed Willink
Re: QVTo transformation from command line [message #1792452 is a reply to message #1792448] Wed, 18 July 2018 08:19 Go to previous messageGo to next message
ashrafur rahman is currently offline ashrafur rahmanFriend
Messages: 21
Registered: May 2018
Junior Member
Thanks a lot for showing the right direction. I try to do it with MANIFEST file. Actually, I am facing multiple problems, while trying to run in standalone mode. Can you please give me any working example for qvto which runs in standalone mode?
Re: QVTo transformation from command line [message #1792469 is a reply to message #1792452] Wed, 18 July 2018 10:31 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6538
Registered: July 2009
Senior Member
Hi

You might get some ideas from:

http://git.eclipse.org/c/mmt/org.eclipse.qvtd.git/tree/tests/org.eclipse.qvtd.doc.bigmde2016.tests/src/org/eclipse/qvtd/doc/bigmde2016/tests/qvto/BigMDE2016QVToTests.java

(and its sibling files). Only complexity is that it uses ProjectMap to make URIs uniform.

Regards

Ed Willink
Re: QVTo transformation from command line [message #1792490 is a reply to message #1792469] Wed, 18 July 2018 15:18 Go to previous messageGo to next message
ashrafur rahman is currently offline ashrafur rahmanFriend
Messages: 21
Registered: May 2018
Junior Member
Thank you so much. I will check it.
Re: QVTo transformation from command line [message #1800126 is a reply to message #1792490] Thu, 20 December 2018 09:43 Go to previous messageGo to next message
Gururaj Maddodi is currently offline Gururaj MaddodiFriend
Messages: 7
Registered: October 2018
Junior Member
Hi,

I'm actually having the same issue. The example looks very promising, but I do not have the ProjectMap package in my Eclispe installation. Could you point as to where I can download the Plugin or the update site.

The plugin from here https://www.eclipse.org/modeling/mdt/downloads/?project=ocl doesn't seem to have the org.eclipse.ocl.pivot.internal.resource.ProjectMap package.

Thanks.
Re: QVTo transformation from command line [message #1800142 is a reply to message #1800126] Thu, 20 December 2018 12:01 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6538
Registered: July 2009
Senior Member
Hi

Oh yes it does. It is in the org.eclipse.ocl.pivot plugin that is installed when you install the examples and editors.

Also: https://git.eclipse.org/c/ocl/org.eclipse.ocl.git/tree/plugins/org.eclipse.ocl.pivot/src/org/eclipse/ocl/pivot/internal/resource/ProjectMap.java

Regards

Ed Willink
Previous Topic:Eclipse QVTo latest P2 repos
Next Topic:Compilation errors found in unit when calling QVTo transform
Goto Forum:
  


Current Time: Wed Dec 11 20:34:59 GMT 2019

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

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

Back to the top