• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

hibernate/xdoclet works in one directory but not another

 
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a simple eclipse project and I cannot get the hibernatedoclet to work. No errors but no hbm files either.

So I downloaded the code that accompanies the book XDoclet in Action and ran the build files. Viola -- I get Blog.hbm.xml files. OK, so I move my one pojo ("Person.java") from my eclipse project file to the "XDoclet in Action" directory and run the build again and I get Person.hbm.xml. Good.

So I move and rename my build file that came with the "XDoclet in Action" files to my eclipse project. I also move Blog.java to my eclipse project and run the same build file that worked before. No luck. No error messages. No hbm files.

I know that hibernate is reading the files because it complains if I introduce syntax errors.

Thanks,
Siegfried

<?xml version="1.0" encoding="UTF-8"?>


<project name="Blog" default="generate-hibernate" basedir=".">
<property name="xdoclet.lib.dir" value="C:\Documents and Settings\Siegfried\My Documents\dev\XDoclet\xdoclet-1.2.3\lib" />
<property name="lib.dir" value="C:\Documents and Settings\Siegfried\My Documents\dev\hibernate\hibernate-3.0" />
<property name="hibernate.dir" value="hbm2" />
<property name="src.dir" value="com/puregamesinc/dao/src" />
<property name="merge.dir" value="merge" />

<path id="xdoclet.lib.path">
<fileset dir="${xdoclet.lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>

<target name="generate-hibernate">
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask"
classpathref="xdoclet.lib.path" />

<!-- Generate Hibernate mapping files -->
<hibernatedoclet destdir="${hibernate.dir}"
mergeDir="${merge.dir}">
<fileset dir="com/puregamesinc/dao/src">
<include name="**/Blog.java" />
</fileset>

<hibernate version="2.0" />
</hibernatedoclet>
</target>
</project>
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a guess by taking a quick look at the ant code and I see some Spaces. This is not a good idea, so you may want to try again after you moved your files to a directory that has no spaces.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic