|Re: acceleo java.lang.NumberFormatException: For input string: "aadlSpec[@name=test]" [message #990564 is a reply to message #989194]
||Thu, 13 December 2012 08:26
| Laurent Goubet
Registered: July 2009
You haven't provided nearly enough information for us to know what could possibly be happening. I'll take a wild guess though :
Caused by: org.eclipse.emf.common.util.WrappedException: java.lang.NumberFormatException: For input string: "aadlSpec[@name=test]"
This indicates that you have defined an id attribute (name) for your class "aadlSpec". However, the Resource implementation tries to find an integer at that point, which would lead be to believe that you should have a custom implementation of Resource for this : in your genmodel, you have set "resource type" to either XMI, XML or basic (i.e. you did not leave it as "none"), and thus you have a class "aadlResourceImpl" that's been generated for your metamodel. This is the implementation that should be in use for your model, and yet the stack shows the basic implementation (ResourceImpl) instead.
If you are launching this generation in standalone, you need to register your resource yourself, see the comments in the class Acceleo generated for you along your main template (AcceleoGenerateAadl2cAction) that tells you how to. Basically, you need a line of the kind : Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("aadl", new aadlResourceFactoryImpl()) (this is from memory, see the comments for the exact line).
Powered by FUDForum
. Page generated in 0.09540 seconds