• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate - field not found: id  RSS feed

Flemming J�nsson
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm - I use Hibernate 3.1.2, XDoclet2, and Ant 1.6.5

I have configured my own tasks for generating and validating .hbm.xml files:

This task works just fine and a bunch of .hbm.xml files are generated and validated.

Next I decided to automatically generate the hibernate.cfg.xml file:

This target also works like a charm

My problem is that I also want to be able to generate the ddl schema file. For that purpose I have this target set up in build.xml:

It parses the hibernate.cfg.xml file and then returns an error like this:
build.xml:447: Schema text failed: Could not read mappings from resource: dk/REMOVED/AfdelingPojo.hbm.xml

So I ran ant in verbose mode and got an exception telling me that it cannot find the field id:

I just don't understand why it says that it cannot find the id field since it is in my AfdelingPojo.hbm.xml file:

Have I misunderstood something or can you spot something I might have missed. Any input will be appreciated since I've been stuck for a couple of hours now :-/

The contents of the generated hibernate.cfg.xml file is:

[ February 23, 2006: Message edited by: Flemming J�nsson ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!