You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Ryan Campbell <ry...@yahoo.com> on 2002/02/12 22:24:21 UTC

"Unable to find resource 'om/Object.vm'" whenGenerating OM Classes

I'm following the *excellent* Torque Tutorial
(http://www.kazmier.com/~kaz/torque/tutorial.html).
(The author of which should take credit/blame for his
work by putting his name on the silly thing!)

I have followed the directions to the point of
generating my OM classes using "ant project-om".  I am
using the nightly build (2/5/02) & Ant 1.4.1.  

After generating what seems to be most of the base
clasess, "ant -debug project-om" exits with the
following exception, the complete stack trace for
which is at the bottom of this email:

org.apache.velocity.exception.ResourceNotFoundException:
Unable to find resource 'om/Object.vm'

However, velocity.log contains the following line at
the very end of the file:

2002-02-12 15:12:07,985 - ResourceManager : found
om/Object.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader

I would appreciate any help.

Thanks,
Ryan Campbell


-------------Stake Trace Follows

/torque/build.xml:394: Exception thrown by
'generator.parse'. For more information consult the\
 velocity log, or invoke ant with the -debug flag.
        at
org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:104)
        at
org.apache.tools.ant.Task.perform(Task.java:217)
        at
org.apache.tools.ant.Target.execute(Target.java:184)
        at
org.apache.tools.ant.Target.performTasks(Target.java:202)
        at
org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at
org.apache.tools.ant.Main.runBuild(Main.java:454)
        at
org.apache.tools.ant.Main.start(Main.java:153)
        at
org.apache.tools.ant.Main.main(Main.java:176)
--- Nested Exception ---
org.apache.velocity.exception.ResourceNotFoundException:
Unable to find resource 'om/Object.vm'
        at
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java)
        at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java)
        at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java)
        at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java)
        at
org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java)
        at
org.apache.velocity.app.Velocity.getTemplate(Velocity.java)
        at
org.apache.velocity.texen.Generator.parse(Generator.java)
        at java.lang.reflect.Method.invoke(Native
Method)
        at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java)
        at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java)
        at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java)
        at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java)
        at
org.apache.velocity.runtime.directive.Foreach.render(Foreach.java)
        at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java)
        at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java)
        at
org.apache.velocity.runtime.directive.Foreach.render(Foreach.java)
        at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java)
        at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java)
        at
org.apache.velocity.runtime.directive.Foreach.render(Foreach.java)
        at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java)
        at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java)
        at
org.apache.velocity.Template.merge(Template.java)
        at
org.apache.velocity.texen.Generator.parse(Generator.java)
        at
org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:104)
        at
org.apache.tools.ant.Task.perform(Task.java:217)
        at
org.apache.tools.ant.Target.execute(Target.java:184)
        at
org.apache.tools.ant.Target.performTasks(Target.java:202)
        at
org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at
org.apache.tools.ant.Main.runBuild(Main.java:454)
        at
org.apache.tools.ant.Main.start(Main.java:153)
        at
org.apache.tools.ant.Main.main(Main.java:176)

Total time: 1 minute 17 seconds


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: "Unable to find resource 'om/Object.vm'" whenGenerating OM Classes

Posted by Ryan Campbell <ry...@yahoo.com>.
> If you don't mind this two step build process, you 
> should be able to proceed from here.

So you're saying I should be more persitent with my
persistence layer?  ;-)  

Sorry, you didn't deserve that.  I too was able to run
the project-om a second time and finally got a "BUILD
SUCCESSFUL."  

Thanks alot, Pete!

Ryan

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: "Unable to find resource 'om/Object.vm'" whenGenerating OM Classes

Posted by Pete Kazmier <pe...@kazmier.com>.
On Tue, Feb 12, 2002 at 05:07:55PM -0500, Pete Kazmier wrote:
> On Tue, Feb 12, 2002 at 01:24:21PM -0800, Ryan Campbell wrote:
> > org.apache.velocity.exception.ResourceNotFoundException:
> > Unable to find resource 'om/Object.vm'
> 
> If you send me your build.properties and database schema I'd be happy
> to try and recreate the problem and then post back the results to the
> list.

Unfortunately, I have not had any luck either.  I get the same error you
reported.  When I first attempt to build your object model, it
successfully generates 203 of your 236 base objects (tables).  On the
204th pass, Velocity complains that it cannot find the same template
(om/Object.vm) it has been using for the past 203 passes.  

If I immediately attempt to generate the object model a second time,
Torque will successfully generate the rest of the object model (the
additional 33 classes are generated for a total of 236).  If you don't
mind this two step build process, you should be able to proceed from
here.

I also tried different platforms (linux and solaris).  Both result in
the same behavior.  Perhaps some of the gurus on this list can help you
out.  I didn't post your schema because I wasn't sure if it was ok to do
so without your permission, but it might help if you supplied it to the
list so someone else might try to recreate the problem.

Sorry I couldn't have been of more help.  I've only learned enough to
write the tutorial as I haven't had the need to actually use Torque yet!
:)

Pete

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: "Unable to find resource 'om/Object.vm'" whenGenerating OM Classes

Posted by Pete Kazmier <pe...@kazmier.com>.
On Tue, Feb 12, 2002 at 01:24:21PM -0800, Ryan Campbell wrote:
> I'm following the *excellent* Torque Tutorial
> (http://www.kazmier.com/~kaz/torque/tutorial.html).

Thanks!

> org.apache.velocity.exception.ResourceNotFoundException:
> Unable to find resource 'om/Object.vm'

If you send me your build.properties and database schema I'd be happy to
try and recreate the problem and then post back the results to the list.

Thanks,
Pete

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>