Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 199
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 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7267
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 #1383253 is a reply to message #1383208] Mon, 26 May 2014 09:23 Go to previous messageGo to next message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 199
Registered: June 2010
Senior Member
Hi Ed,

Thanks for your reply. Although my plugins directory contained three guava plugins, only one of them was used according to the Plugins-depency view. I moved the other two out of the way but that didn't help unfortunately.

I think that the Acceleo version I use is quite new (a time stamp from the 20'th of May seems sufficiently recent).

I'll have to try something different...

Greetings,
Wilbert.
Re: [Acceleo] Generate class not exported? [message #1383287 is a reply to message #1383253] Mon, 26 May 2014 09:42 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7267
Registered: July 2009
Senior Member
Hi

Ah. I got confused by the 3.3.0 in your require bundles.

ClassLoader problems can often be a distant corrolary of the real problem.

You could try debugging with breakpoints on all of NPE, ISE, CCE, IAE,
IOOBE etc enabled.

Regards

Ed Willink

26/05/2014 10:24, Wilbert Alberts wrote:
> Hi Ed,
>
> Thanks for your reply. Although my plugins directory contained three
> guava plugins, only one of them was used according to the
> Plugins-depency view. I moved the other two out of the way but that
> didn't help unfortunately.
>
> I think that the Acceleo version I use is quite new (a time stamp from
> the 20'th of May seems sufficiently recent).
>
> I'll have to try something different...
>
> Greetings,
> Wilbert.
>
Re: [Acceleo] Generate class not exported? [message #1383483 is a reply to message #1383287] Mon, 26 May 2014 11:35 Go to previous messageGo to next message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 199
Registered: June 2010
Senior Member
Hi Ed,

Debugging and browsing the net lead to this bugreport: https://bugs.eclipse.org/bugs/show_bug.cgi?id=419205

I remebered seeing something called AcceleoPluginRunner somewhere. It turns out that when defining a run configuration for an Acceleo transformation, you have to choose between:
- Acceleo Plug-in Application (Default) and
- Java Application (advanced)

Selecting the second one works, the first one doesn't. For me that's sufficient. I'll live with running the transformation via the Java Application.

Greetings,
Wilbert.
Re: [Acceleo] Generate class not exported? [message #1383889 is a reply to message #1383483] Mon, 26 May 2014 18:25 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7267
Registered: July 2009
Senior Member
Hi

Good find.

However I have raised the 'critical'
https://bugs.eclipse.org/bugs/show_bug.cgi?id=395726 against Kepler long
before Luna.

Regards

Ed Willink

On 26/05/2014 12:35, Wilbert Alberts wrote:
> Hi Ed,
>
> Debugging and browsing the net lead to this bugreport:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=419205
>
> I remebered seeing something called AcceleoPluginRunner somewhere. It
> turns out that when defining a run configuration for an Acceleo
> transformation, you have to choose between:
> - Acceleo Plug-in Application (Default) and
> - Java Application (advanced)
>
> Selecting the second one works, the first one doesn't. For me that's
> sufficient. I'll live with running the transformation via the Java
> Application.
>
> Greetings,
> Wilbert.
>
Re: [Acceleo] Generate class not exported? [message #1414013 is a reply to message #1383889] Sat, 30 August 2014 01:47 Go to previous messageGo to next message
Matt Potter is currently offline Matt PotterFriend
Messages: 3
Registered: July 2009
Location: Portand, OR USA
Junior Member
I can't generate anything either with Luna unless I ditch the Acceleo Plug-in Application (Default)
Re: [Acceleo] Generate class not exported? [message #1414646 is a reply to message #1414013] Mon, 01 September 2014 01:05 Go to previous messageGo to next message
Matt Potter is currently offline Matt PotterFriend
Messages: 3
Registered: July 2009
Location: Portand, OR USA
Junior Member
I did some further experiments with Acceleo 3.5.0 under fresh installs of Kepler and Juno and have this exact same problem with Acceleo 3.5.0 in those versions of Eclipse too using the Acceleo sample project. I'm not seeing this as a Luna-specific problem but rather an Acceleo 3.5.0 problem. We just can't upgrade to 3.5 (in any version of Eclipse) and lose the great debugging and interpreter features. Java runner is great when your generator is all done and you want to deploy it under CI, but during the development phase that Acceleo Plugin Application runner is a necessary tool. Treating Java Application runner as 'a fix' for this is a little like saying Ant is a 'fix' for a broken Eclipse JDT that refuses to compile/run/debug your Java project. I hope there's a fix for this coming.
Re: [Acceleo] Generate class not exported? [message #1414774 is a reply to message #1414646] Mon, 01 September 2014 09:23 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7267
Registered: July 2009
Senior Member
Hi

I am really surprised by your comments. There must be something very
different between your usage and mine.

I was never able to use the Plugin launch and raised at least one
irritated Bugzilla questioning why such a guaranteed failure was the
default for new users (cf the '"Launch Acceleo Application" fails'
posting of 23-May-2013).

Since I've never seen the plugin mode working, I cannot comment on how
useful it is, but your analogy to Ant versus JDT seems well over the top.

I am pleased that one impediment to Acceleo usage has been removed.

Regards

Ed Willink


On 01/09/2014 02:05, Matt Potter wrote:
> I did some further experiments with Acceleo 3.5.0 under fresh installs
> of Kepler and Juno and have this exact same problem with Acceleo 3.5.0
> in those versions of Eclipse too using the Acceleo sample project. I'm
> not seeing this as a Luna-specific problem but rather an Acceleo 3.5.0
> problem. We just can't upgrade to 3.5 (in any version of Eclipse) and
> lose the great debugging and interpreter features. Java runner is great
> when your generator is all done and you want to deploy it under CI, but
> during the development phase that Acceleo Plugin Application runner is a
> necessary tool. Treating Java Application runner as 'a fix' for this
> is a little like saying Ant is a 'fix' for a broken Eclipse JDT that
> refuses to compile/run/debug your Java project. I hope there's a fix
> for this coming.
Re: [Acceleo] Generate class not exported? [message #1415848 is a reply to message #1383122] Wed, 03 September 2014 20:23 Go to previous message
Matt Potter is currently offline Matt PotterFriend
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.
Previous Topic:[Acceleo] Open source projects using acceleo?
Next Topic:EditorAction on Acceleo-Editor
Goto Forum:
  


Current Time: Fri Sep 24 11:33:56 GMT 2021

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

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

Back to the top