Generation with Acceleo failed since 3.1.0M7 but worked for 3.1.0M6a https://www.eclipse.org/forums/index.php/mv/msg/210095/673668/#msg_673668
I haven't changed handling for the xml files, nor the templates for Acceleo. The main template is defined as

public void registerPackages(ResourceSet resourceSet) {
super.registerPackages(resourceSet);
// TODO If you need additional package registrations, do them here. The following line is an example for UML.
if (!isInWorkspace(WebmlPackage.class)) {
// The normal package registration if your metamodel is in a plugin.
resourceSet.getPackageRegistry().put(WebmlPackage.eNS_URI, WebmlPackage.eINSTANCE);
} else {
// The package registration that will be used if the metamodel is not deployed in a plugin.
// This should be used if your metamodel is in your workspace.
resourceSet.getPackageRegistry().put("/de.malime.ecore.webml/model/webml.ecore", WebmlPackage.eINSTANCE);
}
}

Since Acceleo 3.1.0M7 I get the warning: "The generation fail to generate any file because there are no model elements that matches at least the type of the first parameter of one of your main templates.
The problem may be caused by a problem with the registration of your metamodel, please see the method named "registerPackages" in the Java launcher of your generator."

Does somebody have any idea, what could be done or changes to resolve this issue?

TIA

Rainer Menke]]>Rainer Menke2011-05-24T12:41:34-00:00Re: Generation with Acceleo failed since 3.1.0M7 but worked for 3.1.0M6a https://www.eclipse.org/forums/index.php/mv/msg/210095/673955/#msg_673955
This warning message is something we've added recently. You say you "get the warning" ... but are your files properly generated or did the generator really failed at generating anything?

There is one case where we log this warning even if the files have been generated, you could be in such a case.

Laurent Goubet
Obeo]]>Laurent Goubet2011-05-25T09:28:56-00:00Re: Generation with Acceleo failed since 3.1.0M7 but worked for 3.1.0M6a https://www.eclipse.org/forums/index.php/mv/msg/210095/673966/#msg_673966
nothing is generated. It seems like Acceleo is unable to resolve the proxy. I am just debugging it. In former version ( M7,RC1 of Acceleo 3.1.0 ) I got the message that the main template generate( null ) could not be found. Now, I do not see this error any longer. Perhaps it is true anyway, perhaps some implementation errors, but in the later case I do not understand why it has worked in M6a.

I added soe of the debug info, but it seems like the defined "language constructs" could not be resolved:

Rainer
]]>Rainer Menke2011-05-25T10:30:35-00:00Re: Generation with Acceleo failed since 3.1.0M7 but worked for 3.1.0M6a https://www.eclipse.org/forums/index.php/mv/msg/210095/675151/#msg_675151
In Acceleo 3.1.0M7 we have introduced several new features in Acceleo. You may want to try first with Acceleo 3.1.0 RC2.
- Does you project use binary or xmi serialization ? (right click on the project -> properties -> acceleo).

(if binary, switch to xmi since it is easier to debug)

From this "/de.malime.ecore.webml/model/webml.ecore", I imagined that your metamodel is in your workspace. If it is the case, you should try to remove the "!isInworkspace" with the xmi resource serialization.
If you want to use binary resources, you will have to register "/de.malime.ecore.webml/model/webml.ecore" but again try to remove the "!isInWorkspace".

If you are working with a metamodel in the workspace, try to use xmi resource serialization since it will allow you to use the regular registration: (resourceSet.getPackageRegistry().put(WebmlPackage.eNS_URI, WebmlPackage.eINSTANCE)).

]]>Stephane Begaudeau2011-05-30T12:37:28-00:00Re: Generation with Acceleo failed since 3.1.0M7 but worked for 3.1.0M6a https://www.eclipse.org/forums/index.php/mv/msg/210095/675411/#msg_675411
sorry for the delay in my reply. I have tested Acceleo 3.1.0 M7 up to Acceleo 3.1.0 RC2. The issues are the same. I have even tried both serializations. I have deleted the line !isInWorkspace. The are two scenarios. One is given with the metamodel als project ( de.malime.ecore.webml/model/webml.ecore ) in the other case the metamodel is deployt as a bundle. I haven't tried eclipse 3.7 RC2 but I am using IBM RSA 8.0.2.

TIA

Rainer Menke ]]>Rainer Menke2011-05-31T12:47:04-00:00Re: Generation with Acceleo failed since 3.1.0M7 but worked for 3.1.0M6a https://www.eclipse.org/forums/index.php/mv/msg/210095/676196/#msg_676196

The uri of your metamodel is "webml" ?
Do you have the same uri in your input model ?
Are you registering your metamodel with the same uri in Eclipse ?
The Launcher Class Generated by Acceleo has two constructors, one which takes the uri of your metamodel, the other one which takes the already loaded model. You should try to use ModelUtils.load(...) to load manually your model and check if the metamodel is correctly resolved. Just like we do it with AbstractAcceleoGenerator#initialize(...) line 415 and line 416.

from the main template mtl. This was one issue, which leads to the message

!MESSAGE The generation fail to generate any file because there are no model elements that matches at least the type of the first parameter of one of your main templates.
The problem may be caused by a problem with the registration of your metamodel, please see the method named "registerPackages" in the Java launcher of your generator.

Based on the fact, that is seems to be a "layer 8 problem", perhaps it would be useful, if the [comment ...] would be remaned in something like [precond ...] because comment seems to be something deletable .

Due to the fact i regenerated the resource relevant parts, I must doublecheck, if the behaviour is fixed with all my ResourceFactories.

Thanks for your hints

Rainer Menke]]>Rainer Menke2011-06-22T14:02:00-00:00Re: Generation with Acceleo failed since 3.1.0M7 but worked for 3.1.0M6a https://www.eclipse.org/forums/index.php/mv/msg/210095/687858/#msg_687858
Rainer Menke wrote on Wed, 22 June 2011 16:02

Based on the fact, that is seems to be a "layer 8 problem", perhaps it would be useful, if the [comment ...] would be remaned in something like [precond ...] because comment seems to be something deletable .

Hi,

We choose to use "comment" because the MOFM2T specification does not define the "entry point" of the generation. This comment defines the main template while keeping Acceleo conform to the OMG's standard but I agree with you, it is one of those thinks that would need to be in the specification and not defined as a comment.

Regards,

Stephane Begaudeau, Obeo

--
Twitter: @sbegaudeau
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo﻿]]>Stephane Begaudeau2011-06-23T12:13:26-00:00Re: Generation with Acceleo failed since 3.1.0M7 but worked for 3.1.0M6a https://www.eclipse.org/forums/index.php/mv/msg/210095/741682/#msg_741682
Today I worked on an Acceleo project that had been built with Eclipse Helios (Acceleo 3.0.2). It seems that the @main comment wasn't required with Acceleo 3.0.2 because my templates used to work correctly in my helios environment.

When I imported my template project in an Indigo workspace, I met the same error message as Rainer Menke and I must admit that it gave me a headache to understand the source of the problem.

Maybe the error message could be more explicit in Acceleo ? Actually, the error message talks about a problem of registered packages, or template argument type.

Maybe would it be possible just to specify that the problem may *also* come from a missing @main comment ?

Regards,

JF. Brazeau]]>Jean-Francois Brazeau2011-10-19T19:55:33-00:00Re: Generation with Acceleo failed since 3.1.0M7 but worked for 3.1.0M6a https://www.eclipse.org/forums/index.php/mv/msg/210095/743166/#msg_743166
Quote:

Maybe would it be possible just to specify that the problem may *also* come from a missing @main comment ?