Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Generate class not exported?
[Acceleo] Generate class not exported? [message #1383122] |
Mon, 26 May 2014 08:05 |
Wilbert Alberts Messages: 209 Registered: June 2010 |
Senior Member |
|
|
Hi,
With recent (Luna M7 and RC1) eclipse/acceleo versions, I'm unable to generate anything.
After creating a simple Acceleo project, with one (main) template, invocation of the transformation results in the following errors:
!ENTRY org.eclipse.osgi 2 0 2014-05-26 09:52:16.422
!MESSAGE AccTestje.main.Generate cannot be found by AccTestje_1.0.0.qualifier
!STACK 0
java.lang.ClassNotFoundException: AccTestje.main.Generate cannot be found by AccTestje_1.0.0.qualifier
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:336)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:328)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:568)
at org.eclipse.acceleo.common.internal.utils.workspace.AcceleoWorkspaceUtil.getClass(AcceleoWorkspaceUtil.java:544)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoLaunchOperation.run(AcceleoLaunchOperation.java:103)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2295)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:259)
at org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:161)
at org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchDelegate.launch(AcceleoLaunchDelegate.java:51)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:884)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!ENTRY org.eclipse.acceleo.common 2 0 2014-05-26 09:52:16.425
!MESSAGE Couldn't load class AccTestje.main.Generate. Check that its containing package is exported.
!ENTRY org.eclipse.acceleo.ide.ui 4 0 2014-05-26 09:52:16.562
!MESSAGE Couldn't load class AccTestje.main.Generate from project AccTestje
However, I checked that the AccTestje.main is exported. From my MANIFEST.MF:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Acceleo AccTestje Module Runtime Plug-in
Bundle-SymbolicName: AccTestje
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: AccTestje.Activator
Bundle-Vendor: Eclipse Modeling Project
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.uml2.uml,
org.eclipse.emf.ecore,
org.eclipse.emf.ecore.xmi,
org.eclipse.ocl,
org.eclipse.ocl.ecore,
org.eclipse.acceleo.common;bundle-version="3.3.0",
org.eclipse.acceleo.model;bundle-version="3.3.0",
org.eclipse.acceleo.profiler;bundle-version="3.3.0",
org.eclipse.acceleo.engine;bundle-version="3.3.0",
com.google.guava
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Export-Package: AccTestje.main
Eclipse version:
Version: Luna RC1 Release (4.4.0RC1)
Build id: 20140522-1310
Acceleo:
Acceleo - Text generation from models
Version: 3.5.0.201405201231
The main template I created is just too simple:
[comment encoding = UTF-8 /]
[module generate('http://www.eclipse.org/uml2/5.0.0/UML')]
[template public generateElement(aModel : Model)]
[comment @main/]
[file (aModel.name, false, 'UTF-8')]
This is generated.
[/file]
[/template]
Any ideas?
|
|
|
Re: [Acceleo] Generate class not exported? [message #1383208 is a reply to message #1383122] |
Mon, 26 May 2014 08:57 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
One possibility.
The many inadequately compatible versions of Guava have been causing a
lot of trouble in multi-project scenarios.
You are using an old Acceleo on a new Eclipse.
Make sure that only one version of Guava is available to your class loaders.
Regards
Ed Willink
On 26/05/2014 09:05, Wilbert Alberts wrote:
> Hi,
>
> With recent (Luna M7 and RC1) eclipse/acceleo versions, I'm unable to
> generate anything.
>
>
>
> After creating a simple Acceleo project, with one (main) template,
> invocation of the transformation results in the following errors:
>
> !ENTRY org.eclipse.osgi 2 0 2014-05-26 09:52:16.422
> !MESSAGE AccTestje.main.Generate cannot be found by
> AccTestje_1.0.0.qualifier
> !STACK 0
> java.lang.ClassNotFoundException: AccTestje.main.Generate cannot be
> found by AccTestje_1.0.0.qualifier
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:336)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:328)
> at
> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
> at
> org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:568)
> at
> org.eclipse.acceleo.common.internal.utils.workspace.AcceleoWorkspaceUtil.getClass(AcceleoWorkspaceUtil.java:544)
> at
> org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoLaunchOperation.run(AcceleoLaunchOperation.java:103)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2295)
> at
> org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:259)
> at
> org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:161)
> at
> org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchDelegate.launch(AcceleoLaunchDelegate.java:51)
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:884)
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
>
> !ENTRY org.eclipse.acceleo.common 2 0 2014-05-26 09:52:16.425
> !MESSAGE Couldn't load class AccTestje.main.Generate. Check that its
> containing package is exported.
>
> !ENTRY org.eclipse.acceleo.ide.ui 4 0 2014-05-26 09:52:16.562
> !MESSAGE Couldn't load class AccTestje.main.Generate from project
> AccTestje
>
>
> However, I checked that the AccTestje.main is exported. From my
> MANIFEST.MF:
>
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Acceleo AccTestje Module Runtime Plug-in
> Bundle-SymbolicName: AccTestje
> Bundle-Version: 1.0.0.qualifier
> Bundle-Activator: AccTestje.Activator
> Bundle-Vendor: Eclipse Modeling Project
> Require-Bundle: org.eclipse.core.runtime, org.eclipse.uml2.uml,
> org.eclipse.emf.ecore,
> org.eclipse.emf.ecore.xmi,
> org.eclipse.ocl,
> org.eclipse.ocl.ecore,
> org.eclipse.acceleo.common;bundle-version="3.3.0",
> org.eclipse.acceleo.model;bundle-version="3.3.0",
> org.eclipse.acceleo.profiler;bundle-version="3.3.0",
> org.eclipse.acceleo.engine;bundle-version="3.3.0",
> com.google.guava
> Bundle-RequiredExecutionEnvironment: JavaSE-1.7
> Bundle-ActivationPolicy: lazy
> Eclipse-LazyStart: true
> Export-Package: AccTestje.main
>
>
> Eclipse version: Version: Luna RC1 Release (4.4.0RC1)
> Build id: 20140522-1310
>
> Acceleo:
> Acceleo - Text generation from models
> Version: 3.5.0.201405201231
>
> The main template I created is just too simple:
>
> [comment encoding = UTF-8 /]
> [module generate('http://www.eclipse.org/uml2/5.0.0/UML')]
>
>
> [template public generateElement(aModel : Model)]
> [comment @main/]
> [file (aModel.name, false, 'UTF-8')]
> This is generated.
> [/file]
> [/template]
>
>
> Any ideas?
|
|
| | | | | | | |
Re: [Acceleo] Generate class not exported? [message #1415848 is a reply to message #1383122] |
Wed, 03 September 2014 20:23 |
Matt Potter Messages: 3 Registered: July 2009 Location: Portand, OR USA |
Junior Member |
|
|
We've relied on the 'Acceleo Plugin Application' launcher for developing several generators from simple to generators that extend other generators. Up until 3.5.0 we've had good results with it. Losing the debugger and interpreter for generator development isn't a practical option for us so we're stuck on 3.4 until I can figure out why its not working.
I've tried completely clean installs of Acceleo 3.5.0 on completely clean Juno, Kepler and Luna (I know Luna isn't supposed to work for the Acceleo Plugin App launch, but I can reproduce the same error on 3.5.0 under Kepler and Juno too. Stephane suggested this is caused by a different issue than the Luna issue and that I should be able to make it work by clean, close/reopen and/or re-import project under Kepler or Juno. However, none of that works either.
On all 3 Eclipse versions Acceleo 3.5.0 gives me exactly the same errors using the Acceleo tutorial project and simple UML model.
Here's the exact steps to reproduce:
1. Fresh install of Luna, Kepler or Juno
2. Install Acceleo 3.5.0
3. Install UML2 Extender SDK
4. Create new Acceleo project
5. Create new UML Example model
6. Select Runner: Acceleo Plugin Application
7. Run...
Results:
On Luna I confirm I see the new error message on the run configuration. One Kepler, Juno I don't (as expected)
On Eclipse Juno, Kepler and Luna I get exactly the same 3 error/warning messages when I launch the Acceleo Plugin Application runner:
- Couldn't load class org.eclipse.acceleo.module.sample.main.Generate from project org.eclipse.acceleo.module.sample
- Couldn't load class org.eclipse.acceleo.module.sample.main.Generate. Check that its containing package is exported.
- The activator org.eclipse.acceleo.module.sample.Activator for bundle org.eclipse.acceleo.module.sample is invalid
Environment is MacOs/JDK-1.6.
I've tried cleaning, closing/opening the project and re-importing into a clean workspace and I'm still seeing these errors under Acceleo 3.5.0 on Kepler. But, it sounds like its supposed to work. I'll keep trying if someone's got another thing I can try.
|
|
|
Goto Forum:
Current Time: Wed Apr 24 23:51:49 GMT 2024
Powered by FUDForum. Page generated in 0.03644 seconds
|