Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Acceleo UI Launcher cannot find Java Services and UML Profile
Acceleo UI Launcher cannot find Java Services and UML Profile [message #1803634] Tue, 05 March 2019 20:17 Go to next message
Thomas Pusztai is currently offline Thomas PusztaiFriend
Messages: 27
Registered: September 2018
Junior Member
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 #1803659 is a reply to message #1803634] Wed, 06 March 2019 10:43 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6422
Registered: July 2009
Senior Member
Hi

Sorry. I can mostly just sympathize.

UML has complexities for Acceleo but hopefully you got past those in your simple project.

Acceleo has problems resolving references between projects. I really don't recommend multiple projects.

It is surprisingly hard to copy projects and consistently rename everything; you probably missed something. A single mistake can cause chaos. Do a deep search for everything matching the old name. Perhaps just practice by doing simple rename and getting that to work.

Regards

Ed Willink
Re: Acceleo UI Launcher cannot find Java Services and UML Profile [message #1803683 is a reply to message #1803659] Wed, 06 March 2019 18:04 Go to previous messageGo to next message
Thomas Pusztai is currently offline Thomas PusztaiFriend
Messages: 27
Registered: September 2018
Junior Member
Hi,

Thanks for your response. I just ran a deep search for the previous names of the two projects that I renamed and found nothing.

Do you have any other ideas?

I found this thread (https://www.eclipse.org/forums/index.php/t/209485/ ), where someone had exactly the same error message, like me in problem 1. It was resolved by updating to Acceleo 3.0.4, which contained a bugfix for it. I'm running Acceleo 3.7.7 - could this be a regression?
Re: Acceleo UI Launcher cannot find Java Services and UML Profile [message #1803687 is a reply to message #1803683] Wed, 06 March 2019 19:01 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6422
Registered: July 2009
Senior Member
Hi

I'm sorry. I stopped using Acceleo 5 years ago. In the absence of responses from the Acceleo team, I do my best to help where I can, but some problems just seem familiar without solutions. IIRC I had to regularly use the debugger and modify the 'main' program to workaround reference resolution issues.

Regards

Ed Willink

Re: Acceleo UI Launcher cannot find Java Services and UML Profile [message #1803715 is a reply to message #1803687] Thu, 07 March 2019 13:04 Go to previous messageGo to next message
Thomas Pusztai is currently offline Thomas PusztaiFriend
Messages: 27
Registered: September 2018
Junior Member
Hi,

Thanks, I appreciate your help. I remember that you've told me in another forum post that you've switched to Xtend some years ago. Since I already had a codebase in Acceleo and due to time constraints, switching wasn't an option for me in this project.

I think that Acceleo has a lot of potential, it just needs a little more polishing.

Does anyone from Obeo/Acceleo have an idea for my problems?
Re: Acceleo UI Launcher cannot find Java Services and UML Profile [message #1803759 is a reply to message #1803715] Fri, 08 March 2019 13:18 Go to previous message
Thomas Pusztai is currently offline Thomas PusztaiFriend
Messages: 27
Registered: September 2018
Junior Member
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.
Previous Topic:Using AQL Programmatically : is it really discouraged?
Next Topic:How to convter msg to vcf
Goto Forum:
  


Current Time: Wed Jul 17 20:32:15 GMT 2019

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

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

Back to the top