I have very limited experience with the hibernate plugin but based on the ClassNotFoundException I would say that the classpath given to the ant task doesn't have everything it needs to run. The javax.persistence package tells me that it is missing the JPA API/interface jar (I think that is something like persistence-api.jar). You can try to print out the classpath that to see if all the jars you expect are present. You can print out a path with an id like this (Ant >= 1.7).
- <echo>${toString:mypath.classpath}</echo>
Hope this helps.