Can't generate java from UML using Acceleo in Eclipse

后端 未结 3 1985
太阳男子
太阳男子 2021-01-15 04:43

I am new to Eclipse and Acceleo, and I have been trying to complete the First Generator Model Tutorial. I am using Kepler 4.3 and Acceleo 3.X. I am following the tutorial th

相关标签:
3条回答
  • 2021-01-15 05:05

    I corrected this error by updating the classpath in the MANIFEST.MF file :

    I added the bin/ folder of the projet. It now works properly.

    Etienne

    0 讨论(0)
  • 2021-01-15 05:11

    I had exactly the same problem using Acceleo 3.5.0 on a clean Kepler and a clean Luna install. In Luna Acceleo displays a warning when you select the 'Acceleo Plugin Application' for the Runner in the run configuration. If you select 'Java Application' instead it works on Kepler.

    A little research led me to the following 'fixed' bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=419205 . The 'fix' I guess was to add an error message in Luna telling us this feature doesn't work. I see exactly the same problem in Kepler and in Juno too with Acceleo 3.5 so it doesn't seem Luna specific at all.

    Only workarounds I've found for this are to:

    • switch back to Acceleo 3.4 or
    • use only 'Java Application' referred to as 'standalone' in the documentation as it runs outside of Eclipse.

    The problem with standalone is then you lose all the great features of Acceleo's debugger and interpreter, plus you have longer wait time testing your templates.

    0 讨论(0)
  • 2021-01-15 05:20
    java.lang.ClassNotFoundException: org.eclipse.acceleo.module.sample.Activator cannot be found by org.eclipse.acceleo.module.sample_1.0.0.qualifier
    

    The most likely reason I can think of is that you have used the File > New Plug-in Project wizard and kept most of the default values, yet afterwards removed (or renamed) the "Activator" class that it created in your project.

    The META-INF/MANIFEST.MF file of your project should contain a line that looks like :

    Bundle-Activator: org.eclipse.acceleo.module.sample.Activator
    

    And if it does, it most likely shows a warning or error on that line. You can either remove the line altogether or make sure you indeed have a plug-in activator with that qualified name.

    0 讨论(0)
提交回复
热议问题