incubator-empire-db-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis De Brabandere <franci...@gmail.com>
Subject Re: Problem with the location of velocity-templates in the code-generator
Date Mon, 17 Oct 2011 05:41:11 GMT
Still have this problem?

Sent with my smartphone.
On Oct 16, 2011 1:50 PM, "Rainer Döbele" <doebele@esteam.de> wrote:

> 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
>
>
>
> <dependency>
>
>      <groupId>org.apache.empire-db</groupId>
>
>      <artifactId>empire-db-codegen</artifactId>
>
>      <version> 2.2.0-incubating-SNAPSHOT</version>
>
> </dependency>
>
>
>
> 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(CommonsLogLogChute.java:96)
>
> ERROR [2011/10/16 13:35]: Unable to find resource 'templates\Database.vm'
>  at
> org.apache.empire.db.codegen.CodeGenWriter.writeFile(CodeGenWriter.java:301)
>
> org.apache.velocity.exception.ResourceNotFoundException: Unable to find
> resource 'templates\Database.vm'
>
>      at
> org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:474)
>
>      at
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352)
>
>      at
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1533)
>
>      at
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1514)
>
>      at
> org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:373)
>
>      at
> org.apache.empire.db.codegen.CodeGenWriter.writeFile(CodeGenWriter.java:295)
>
>      at
> org.apache.empire.db.codegen.CodeGenWriter.createDatabaseClass(CodeGenWriter.java:203)
>
>      at
> org.apache.empire.db.codegen.CodeGenWriter.generateCodeFiles(CodeGenWriter.java:132)
>
>      at
> org.apache.empire.db.codegen.CodeGenerator.generate(CodeGenerator.java:61)
>
>      at
> org.apache.empire.db.codegen.CodeGenerator.generate(CodeGenerator.java:72)
>
>
>
>
>
> Thanks
>
> Rainer
>
>
>
>

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