incubator-empire-db-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Döbele <doeb...@esteam.de>
Subject re: Problem with the location of velocity-templates in the code-generator
Date Mon, 17 Oct 2011 06:57:22 GMT
Yes, but for me this is not a stopper.

Had no time to investigate and solve it.
Thus I simply started the code generator itself.

Regards
Rainer


> from: Francis De Brabandere [mailto:francisdb@gmail.com]
> to: empire-db-dev@incubator.apache.org
> re: Re: Problem with the location of velocity-templates in the code-
> generator
> 
> 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(CommonsLogLog
> Ch
> > ute.java:96)
> >
> > ERROR [2011/10/16 13:35]: Unable to find resource
> 'templates\Database.vm'
> >  at
> >
> org.apache.empire.db.codegen.CodeGenWriter.writeFile(CodeGenWriter.ja
> v
> > a: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(R
> > esourceManagerImpl.java:352)
> >
> >      at
> >
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstanc
> > e.java:1533)
> >
> >      at
> >
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstanc
> > e.java:1514)
> >
> >      at
> > org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java
> > :373)
> >
> >      at
> >
> org.apache.empire.db.codegen.CodeGenWriter.writeFile(CodeGenWriter.ja
> v
> > a:295)
> >
> >      at
> >
> org.apache.empire.db.codegen.CodeGenWriter.createDatabaseClass(Code
> Gen
> > Writer.java:203)
> >
> >      at
> >
> org.apache.empire.db.codegen.CodeGenWriter.generateCodeFiles(CodeGe
> nWr
> > iter.java:132)
> >
> >      at
> >
> org.apache.empire.db.codegen.CodeGenerator.generate(CodeGenerator.ja
> va
> > :61)
> >
> >      at
> >
> org.apache.empire.db.codegen.CodeGenerator.generate(CodeGenerator.ja
> va
> > :72)
> >
> >
> >
> >
> >
> > Thanks
> >
> > Rainer
> >
> >
> >
> >

Mime
View raw message