JAR files XDoclet needs for Hibernate
Today I began refactoring some Hibernate data objects in order to use XDoclet to generate the mapping files. When creating the Ant taskdef:
<taskdef name="hibernatedoclet" classname="xdoclet.modules.hibernate.HibernateDocletTask" classpathref="lib.class.path" />
Eclipse was kind enough to tell me all the XDoclet JARs I was missing — except one. The missing one didn’t turn up until I ran the Ant task and got:
[hibernatedoclet] - Running <hibernate/> [hibernatedoclet] Generating mapping file for com.client.dataobjects.Portfolio. [hibernatedoclet] com.client.dataobjects.Portfolio [hibernatedoclet] - Could not find tag handler for prefix: 'XDtCollection' [hibernatedoclet] - Error occured at/around line 166, offending template tag: XDtCollection:create [hibernatedoclet] xdoclet.template.TemplateException: Could not find tag handler for prefix: 'XDtCollection' [hibernatedoclet] at xdoclet.template.TemplateEngine.getTagHandlerFor (TemplateEngine.java:207) ... [hibernatedoclet] - Running XDoclet failed. [hibernatedoclet] - <<Running XDoclet failed.>>
For my future reference, here are the XDoclet JAR files needed to generate the Hibernate mapping hbm files:
xdoclet-xdoclet-module-1.2.1.jar <-- the one that fixes the above problem xdoclet-1.2.1.jar xdoclet-hibernate-module-1.2.1.jar xjavadoc-1.0.3.jar
Update: From the xdoclet-user mailing list, the Hibernate ant task also needs the commons-collections-2.1.jar and commons-logging-1.0.3.jar. But since my project already had those in the Ant classpath, those didn’t cause me any grief.