Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate & Ant  RSS feed

David Mace
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm at my wits end with this particular problem. I'm running an ant build script to push the schema to the db server from my hibernate mappings and I'm getting this error:

Schema text failed: net.sf.Hibernate.MappingException: persistent class com.*.*.* not found

First, the mapping document is located quite correctly. I had this same problem yesterday, however upon changing my classpath around to contain only the files I needed for the build, it worked fine. Now today, with no changes happening overnight, I boot up and I am having the exact same issue, however I have not changed anything in the classpath. What give?

Ant looks into my classpath for all the requisite libraries when it is compiling, right? What about the /lib directory that is suggested when you're looking from the Hibernate Developer's Journal book? There are hibernate requisites located within that directory as this not necessary if everything is available from the classpath? I'm a bit lost here.

Thanks for the help,
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!