Acceleo UI Launcher cannot find Java Services and UML Profile [message #1803634] |
Tue, 05 March 2019 15:17  |
Eclipse User |
|
|
|
Hi,
I'm working on a code generator research project using Acceleo 3.7 and Eclipse MDT Oxygen.
I originally started this research in one private repository and recently split up the project into three public repositories.
I have two problems with the new repositories (I basically just copied the projects into new folders and changed the project names):
1. I added an Acceleo UI Launcher project (FogUML2Code.ui) for my code generator. If I launch an Eclipse instance with it and right click on a .uml file to generate code, I get a series of exceptions starting with
!ENTRY org.eclipse.acceleo.engine 4 4 2019-03-05 21:01:46.123
!MESSAGE Class pusztai.thomas.architecture.fog.uml.gen.services.FogUmlServices Couldn't be found in the classpath of the bundle containing module fogUmlServices.emtl.
!STACK 0
org.eclipse.acceleo.engine.AcceleoEvaluationException: Class pusztai.thomas.architecture.fog.uml.gen.services.FogUmlServices Couldn't be found in the classpath of the bundle containing module fogUmlServices.emtl.
This refers to this Java Service, which worked fine when I launched the code generation from the old project by right clicking the main mtl file and selecting "Run As -> Launch Acceleo Application". I already checked that I'm exporting the package that contains the services in my MANIFEST.MF.
2. Even "Run As -> Launch Acceleo Application" on the main .mtl file doesn't work from the new project location anymore, because Eclipse seems to have problems locating the custom UML2 profile that I created (it's opened in a project in the same workspace). When trying to run it on the model.uml file from my example project I get this exception:
Exception in thread "main" org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http:///pusztai/thomas/architecture/fog/1.0' not found. (file:/C:/Users/Thomas/Development/GitRepos/Uni/health-care-iot-example/model.uml, 582, 91)
When opening the model.uml file in the Eclipse UML Model editor, I can see the Fog profile.
Does anybody have an idea for any of these problems?
|
|
|
|
|
|
|
Re: Acceleo UI Launcher cannot find Java Services and UML Profile [message #1803759 is a reply to message #1803715] |
Fri, 08 March 2019 08:18  |
Eclipse User |
|
|
|
I've solved the problem. I created a new project for the code generator and moved the existing code to that project (with very few modifications). Then I created a new project for the UI launcher and it's working now.
I'm now registering two packages less in the registerPackages() method of my main class (I dropped org.eclipse.ocl.types and org.eclipse.uml2.uml.profile.standard) and the root folders of the projects now have the same names as the projects. I don't know if any of these fixed the problem or if it was just the new project.
Anyway, problem 1 is solved, problem 2 from my original post still persists, but since the code generator is working if I launch an Eclipse application with it, I can live with that.
|
|
|
Powered by
FUDForum. Page generated in 0.06234 seconds