Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
I used Middlegen-Hibernate-r5,but in ant entironment,it show:
D:\mid>ant
Buildfile: build.xml
init:
fail-if-no-xdoclet-1.2:
check-driver-present:
panic-if-driver-not-present:
middlegen:
[echo] Class path = D:\mid
[middlegen] java.util.zip.ZipException: error in opening zip file
[middlegen] at java.util.zip.ZipFile.open(Native Method)
[middlegen] at java.util.zip.ZipFile.<init>(ZipFile.java:112)
[middlegen] at java.util.zip.ZipFile.<init>(ZipFile.java:128)
[middlegen] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLo
ader.java:867)
[middlegen] at org.apache.tools.ant.AntClassLoader.getResource(AntClassLoade
r.java:796)
[middlegen] at org.apache.log4j.helpers.Loader.getResource(Loader.java:91)
[middlegen] at org.apache.log4j.LogManager.<clinit>(LogManager.java:94)
[middlegen] at org.apache.log4j.Category.getInstance(Category.java:514)
[middlegen] at middlegen.Middlegen.<clinit>(Middlegen.java:108)
[middlegen] at middlegen.MiddlegenTask.<init>(MiddlegenTask.java:143)
[middlegen] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
[middlegen] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeC
onstructorAccessorImpl.java:39)
[middlegen] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Del
egatingConstructorAccessorImpl.java:27)
[middlegen] at java.lang.reflect.Constructor.newInstance(Constructor.java:27
4)
[middlegen] at java.lang.Class.newInstance0(Class.java:308)
[middlegen] at java.lang.Class.newInstance(Class.java:261)
[middlegen] at org.apache.tools.ant.Project.createTask(Project.java:1115)
[middlegen] at org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.j
ava:289)
[middlegen] at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement
.java:262)
[middlegen] at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownEle
ment.java:115)
[middlegen] at org.apache.tools.ant.Task.perform(Task.java:340)
[middlegen] at org.apache.tools.ant.Target.execute(Target.java:309)
[middlegen] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[middlegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[middlegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1255
)
[middlegen] at org.apache.tools.ant.Main.runBuild(Main.java:609)
[middlegen] at org.apache.tools.ant.Main.start(Main.java:196)
[middlegen] at org.apache.tools.ant.Main.main(Main.java:235)
BUILD FAILED
file:D:/mid/build.xml:148: Could not create task of type: middlegen due to java.
lang.IllegalStateException: Error looking for plugins:error in opening zip file
Total time: 3 seconds