Community
Participate
Working Groups
VIATRA-DSE is missing some transitive dependencies. For a reproducible example, see this branch of this year's TTC submission: https://github.com/FTSRG/ttc16-cra-viatra-dse/tree/viatra-maven The application compiles but upon running, it throws a NoClassDefFoundError. Build output: https://travis-ci.org/FTSRG/ttc16-cra-viatra-dse/builds/172352471#L4522: Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/emf/edit/domain/EditingDomain Adding these EMF dependencies (from the Acceleo repository) manually makes it work: <dependency> <groupId>org.eclipse.emf</groupId> <artifactId>org.eclipse.emf.common</artifactId> <version>2.10.1</version> </dependency> <dependency> <groupId>org.eclipse.emf</groupId> <artifactId>org.eclipse.emf.ecore.xmi</artifactId> <version>2.10.1</version> </dependency> <dependency> <groupId>org.eclipse.emf</groupId> <artifactId>org.eclipse.emf.ecore</artifactId> <version>2.10.1</version> </dependency> <dependency> <groupId>org.eclipse.emf</groupId> <artifactId>org.eclipse.emf.edit</artifactId> <version>2.10.1</version> </dependency> <dependency> <groupId>org.eclipse.birt.runtime</groupId> <artifactId>org.eclipse.emf.ecore.change</artifactId> <version>2.10.0.v20150123-0348</version> </dependency> The application now runs without errors: https://travis-ci.org/FTSRG/ttc16-cra-viatra-dse/builds/172351611#L2214
Further inspection revealed that <dependency> <groupId>org.eclipse.emf</groupId> <artifactId>org.eclipse.emf.ecore.xmi</artifactId> <version>2.10.1</version> </dependency> <dependency> <groupId>org.eclipse.emf</groupId> <artifactId>org.eclipse.emf.edit</artifactId> <version>2.10.1</version> </dependency> <dependency> <groupId>org.eclipse.birt.runtime</groupId> <artifactId>org.eclipse.emf.ecore.change</artifactId> <version>2.10.0.v20150123-0348</version> </dependency>
is also a sufficient set of dependencies.
New Gerrit change created: https://git.eclipse.org/r/84343
Thanks for the report; but the conclusion is not the way to go: instead of adding direct dependencies, transitive Maven dependencies should not be removed, only transitive p2 dependencies, as the related change tries to do.
Gerrit change https://git.eclipse.org/r/84343 was merged to [master]. Commit: http://git.eclipse.org/c/viatra/org.eclipse.viatra.git/commit/?id=c318b6f54d4d56592e8a06c0210ab721eafcaba6
The change is merged; the original issue should be fixed for now (after the builds run correctly; should be ready in about an hour). Could you please test it whether it really solves the issue?
Unfortunately, this did not solve the issue. The result of the latest build - https://travis-ci.org/FTSRG/ttc16-cra-viatra-dse/builds/172820697 - throws the same exception upon running: Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/emf/edit/domain/EditingDomain at hu.bme.mit.viatra.ttc.dse.CraHelper.loadInitialModel(CraHelper.java:26) at hu.bme.mit.viatra.ttc.dse.DseSolverMain.main(DseSolverMain.java:48) Caused by: java.lang.ClassNotFoundException: org.eclipse.emf.edit.domain.EditingDomain at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
Nasz, does DSE globally require EMF Edit, or this is only the case for this specific application?
It is required for the backtracking mechanism (undoing a transformation), so it is an essential dependency.
(In reply to Andras Szabolcs Nagy from comment #9) > It is required for the backtracking mechanism (undoing a transformation), so > it is an essential dependency. Ok, I see. Then it is important to add EMF edit to the dependencies list of the maven module. Still, we should add as little as possible.
New Gerrit change created: https://git.eclipse.org/r/84410
Gerrit change https://git.eclipse.org/r/84410 was merged to [master]. Commit: http://git.eclipse.org/c/viatra/org.eclipse.viatra.git/commit/?id=6cdda9c18184ec1753e9db8e106f57065b485a1d
Indeed, all three dependency that Gábor mentioned was required, I added them manually to the parent.dse/pom.xml. The bad side that I had to specify the exact version numbers, which have to be maintained over time. The tests are running as expected: https://travis-ci.org/FTSRG/ttc16-cra-viatra-dse/builds/172820697
Thanks, it works! It also works after I bumped the dependencies to 1.5.0.M1 versions: https://travis-ci.org/FTSRG/ttc16-cra-viatra-dse/builds/173018084