I'm now trying to use the binary format for my template instead of XMI (I've read that it's better in terms of performance, which is something I want considering my current perfs are pretty bad). So I flipped the "binary" checkbox in the acceleo projects containing my templates and everything compiles correctly in eclipse. But when I try to run the application, I get the "proxy" error:

org.eclipse.acceleo.engine.AcceleoEvaluationException: The type of the first parameter of the main template named 'generatePackage' is a proxy.
at org.eclipse.acceleo.engine.service.AcceleoService.doGenerate(AcceleoService.java:566)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.generate(AbstractAcceleoGenerator.java:193)
at org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator.doGenerate(AbstractAcceleoGenerator.java:158)

I know that it has something to do with the registration of my metamodel, so I go directly in the 'registerPackages' and add the following:

To add something to my confusion, the generated code contains in comment for the registerPackages() method:

* // 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 and if you are using binary resource serialization.
* resourceSet.getPackageRegistry().put("/myproject/myfolder/mysubfolder/MyUMLMetamodel.ecore", UMLPackage.eINSTANCE);

What am I supposed to do ?

Now, I'm lost... I don't understand why there is a problem with package registration when changing XMI to binary...

1- Which version of Acceleo are you using?
2- You should add the other two metamodels in your module header [module generatePackage('http://root/1.0', 'http://root/subpack/1.0', 'http://root/subpack/subsubpack/1.0')/] because you may be manipulating element from those subpackages.
3- instead of "resourceSet.getPackageRegistry().put(RootPackage.eINSTANCE.getNsURI(), RootPackage.eINSTANCE);" which tells EMF that the "NsURI" matches your metamodel, you should use "resourceSet.getPackageRegistry().put("/metamodel.project.in.workspace/model/root.ecore", RootPackage.eINSTANCE);" which tells EMF that if it sees something with "/metamodel.project.in.workspace/model/root.ecore", it's from your metamodel. Since BinaryResource are (were?) lacking an URI handler, you need to use the path of the metamodel in the workspace. While working with binary resources, deploying the metamodel in the Eclipse instance is often the best option.

I'm using acceleo 3.2.0. Using workspace relative path to ecore file worked. I should have tested that earlier, before coming here and ask for help... But I thought that using workspace path would only work if running inside eclipse..