incubator-empire-db-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Döbele <>
Subject Problem with the location of velocity-templates in the code-generator
Date Sun, 16 Oct 2011 11:49:38 GMT
Hi all,


I have a minor problem with the code generator.

I have set up a new project from which I try to call the code generator from my own class
like this:


public class MyCodeGenerator {

    public static void main( String[] args ) {

        CodeGenerator app = new CodeGenerator();

        app.generate( "myconfig.xml" );




In my pom I have a dependency to the current snapshot





      <version> 2.2.0-incubating-SNAPSHOT</version>



Everything works fine until the parsed classes should be written.

For some reason the velocity engine cannot locate the templates in the resource folder.


Any idea what I can to so that the templates will be found?


Here is the error:

ResourceManager : unable to find resource 'templates\Database.vm' in any resource loader.
 at org.apache.velocity.runtime.log.CommonsLogLogChute.log( 

ERROR [2011/10/16 13:35]: Unable to find resource 'templates\Database.vm'  at org.apache.empire.db.codegen.CodeGenWriter.writeFile(

org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'templates\Database.vm'

      at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(

      at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(

      at org.apache.velocity.runtime.RuntimeInstance.getTemplate(

      at org.apache.velocity.runtime.RuntimeInstance.getTemplate(


      at org.apache.empire.db.codegen.CodeGenWriter.writeFile(

      at org.apache.empire.db.codegen.CodeGenWriter.createDatabaseClass(

      at org.apache.empire.db.codegen.CodeGenWriter.generateCodeFiles(

      at org.apache.empire.db.codegen.CodeGenerator.generate(

      at org.apache.empire.db.codegen.CodeGenerator.generate(






  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message