Hi All.
Background: I'm trying to move our T2.1 app to use Torque. So I
updated from CVS this morning, 'ant dist', then expanded the .zip
and moved my 2.1 schema into torque/schema. I make minor
adjustments to the schema files: changed the DOCTYPE and removed
<app-data> tags. That made them validate correctly against the
DTD.
But torque wouldn't build our OM.
Ant reported:
<ant-error>
~/torque % ant
<snip/>
BUILD FAILED
/Users/dobbs/torque/build.xml:431: Exception thrown by
'generator.parse'. For more inform\
ation consult the velocity log, or invoke ant with the -debug flag.
</ant-error>
velocity.log ended with these errors:
<velocity.log>
2002-03-07 16:54:27,896 - ResourceManager : unable to find resource
'om/ExtensionManager.vm' in any resource loader.
2002-03-07 16:54:27,900 - Method parse threw exception for reference
$generator in template om/Control.vm at [64,7]
</velocity.log>
I scoured our schema for a long time without discovering the
problem. Finally I modified om/Control.vm and got our OM to
generate.
Here's the modifications I had to make to get Torque to build
our OM:
<unidiff>
--- Control-broken.vm Thu Mar 7 09:48:31 2002
+++ Control-works.vm Thu Mar 7 16:37:29 2002
@@ -48,20 +48,10 @@
#set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )
$generator.parse("om/Object.vm",$path,"table",$tbl)
- #set ( $fname = "${basePrefix}${firstcap}Manager.java" )
- #set ( $path = "${strings.getPackageAsPath($pkbase)}$fname" )
- $generator.parse("om/BaseManager.vm",$path,"table",$tbl)
-
#set ( $fname = "${firstcap}.java" )
#set ( $path = "${strings.getPackageAsPath($package)}$fname" )
#if (!$files.file($basePath,$path).exists())
$generator.parse("om/ExtensionObject.vm",$path,"table",$tbl)
- #end
-
- #set ( $fname = "${firstcap}Manager.java" )
- #set ( $path = "${strings.getPackageAsPath($package)}$fname" )
- #if (!$files.file($basePath,$path).exists())
- $generator.parse("om/ExtensionManager.vm",$path,"table",$tbl)
#end
#set ( $fname = "${firstcap}Peer.java" )
</unidiff>
The BaseXXXManager and XXXManager is new. Looks like it's supposed
to be used in conjunction with JCS for caching OM objects. Would
anyone mind if I make that stuff optional? A property in
build.properties that I can override in my ~/build.properties?
-Eric
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>