I'm trying 1.2-M9 and the cgen task is acting strangely. The generation
works as usual for the first seven entities (out of 214), but on the
eighth it runs into a problem. I added some print statements to the
source and narrowed it down a bit.
EntityResolver.constructCache() calls ObjectEntity.getJavaClass() on my
entity model.AutoUpdate.
(It's a small class, nothing special about it that I can see, only one
method.)
It calls Util.getJavaClass(name) which gets
"java.lang.ClassNotFoundException: model.AutoUpdate".
The task continues, however, and 17 entities later it stops in almost
the same place, Util.getJavaClass() calling Class.forName(). It gives
an error message "Error generating classes: common/ExceptionAdapter"
which is strange because that's a small utility class in a different
package that happens to be imported by the entity.
I read the new docs and saw new options for cgen, but they're optional
and I didn't think they'd break the way I was using it. Which is:
<target name="cgen">
<taskdef name="cgen"
classname="org.objectstyle.cayenne.tools.CayenneGenerator"/
<cgen map="conf/DataMap.map.xml"
destDir="src"
template="conf/subclass.vm"
supertemplate="conf/superclass.vm"
superpkg="model.auto"
usepkgpath="true"
/>
</target>
I've reduced my model to only two entities, trying to make a simple test
case, and the problem is still happening. I tried removing my two
template lines, no diff. This worked fine in 1.2M4.
This archive was generated by hypermail 2.0.0 : Mon Jan 02 2006 - 12:43:28 EST