Return-Path: X-Original-To: apmail-incubator-empire-db-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-empire-db-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F150F94D5 for ; Wed, 30 Nov 2011 11:14:46 +0000 (UTC) Received: (qmail 44260 invoked by uid 500); 30 Nov 2011 11:14:45 -0000 Delivered-To: apmail-incubator-empire-db-dev-archive@incubator.apache.org Received: (qmail 43923 invoked by uid 500); 30 Nov 2011 11:14:44 -0000 Mailing-List: contact empire-db-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: empire-db-dev@incubator.apache.org Delivered-To: mailing list empire-db-dev@incubator.apache.org Received: (qmail 43793 invoked by uid 99); 30 Nov 2011 11:14:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 11:14:44 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=RCVD_IN_BRBL_LASTEXT,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [88.79.172.157] (HELO mail.esteam.de) (88.79.172.157) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 11:14:39 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message Subject: re: Problem with the location of velocity-templates in the code-generator MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 30 Nov 2011 12:14:14 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: re: Problem with the location of velocity-templates in the code-generator thread-index: AcyvThXEOkp895DwTRO5A4/hPBgB2Q== From: =?iso-8859-1?Q?Rainer_D=F6bele?= To: An issue for the code-generator template location problem has been = created. Sorry, but time has been elapsing even more rapidly recently than it = usually does. But I am really happy and excited that our graduation vote has passed = and we're finally mature. Time to open the Champaign, isn't it? Thanks to everyone committers and non-committers for your involvement. 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 >=20 > Rainer, >=20 > Maybe you could create an issue for this one? >=20 > Cheers, > Francis >=20 > On Mon, Oct 17, 2011 at 8:57 AM, Rainer D=F6bele > wrote: > > 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=F6bele" = 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 { > >> > > >> > =A0 =A0public static void main( String[] args ) { > >> > > >> > =A0 =A0 =A0 =A0CodeGenerator app =3D new CodeGenerator(); > >> > > >> > =A0 =A0 =A0 =A0app.generate( "myconfig.xml" ); > >> > > >> > =A0 =A0} > >> > > >> > } > >> > > >> > > >> > > >> > In my pom I have a dependency to the current snapshot > >> > > >> > > >> > > >> > > >> > > >> > =A0 =A0 =A0org.apache.empire-db > >> > > >> > =A0 =A0 =A0empire-db-codegen > >> > > >> > =A0 =A0 =A0 2.2.0-incubating-SNAPSHOT > >> > > >> > > >> > > >> > > >> > > >> > 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. =A0at > >> > > >> > 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' > >> > =A0at > >> > > >> > org.apache.empire.db.codegen.CodeGenWriter.writeFile(CodeGenWriter.ja > >> v > >> > a:301) > >> > > >> > org.apache.velocity.exception.ResourceNotFoundException: Unable = to > >> > find resource 'templates\Database.vm' > >> > > >> > =A0 =A0 =A0at > >> > > >> > org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource > >> ( > >> > ResourceManagerImpl.java:474) > >> > > >> > =A0 =A0 =A0at > >> > > >> > org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource( > >> R > >> > esourceManagerImpl.java:352) > >> > > >> > =A0 =A0 =A0at > >> > > >> > org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstan > >> c > >> > e.java:1533) > >> > > >> > =A0 =A0 =A0at > >> > > >> > org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstan > >> c > >> > e.java:1514) > >> > > >> > =A0 =A0 =A0at > >> > = org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.j > >> > ava > >> > :373) > >> > > >> > =A0 =A0 =A0at > >> > > >> > org.apache.empire.db.codegen.CodeGenWriter.writeFile(CodeGenWriter.ja > >> v > >> > a:295) > >> > > >> > =A0 =A0 =A0at > >> > > >> > org.apache.empire.db.codegen.CodeGenWriter.createDatabaseClass(Code > >> Gen > >> > Writer.java:203) > >> > > >> > =A0 =A0 =A0at > >> > > >> > org.apache.empire.db.codegen.CodeGenWriter.generateCodeFiles(CodeGe > >> nWr > >> > iter.java:132) > >> > > >> > =A0 =A0 =A0at > >> > > >> > org.apache.empire.db.codegen.CodeGenerator.generate(CodeGenerator.ja > >> va > >> > :61) > >> > > >> > =A0 =A0 =A0at > >> > > >> > org.apache.empire.db.codegen.CodeGenerator.generate(CodeGenerator.ja > >> va > >> > :72) > >> > > >> > > >> > > >> > > >> > > >> > Thanks > >> > > >> > Rainer > >> > > >> > > >> > > >> > > > >=20 >=20 >=20 > -- > http://www.somatik.be > Microsoft gives you windows, Linux gives you the whole house.