File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes java.lang.IllegalStateException: zip file closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "java.lang.IllegalStateException: zip file closed" Watch "java.lang.IllegalStateException: zip file closed" New topic

java.lang.IllegalStateException: zip file closed

Vilpesh Mistry
Ranch Hand

Joined: May 27, 2003
Posts: 62


I am facing the problem in generating java code files from eclipse-JEE-indigo while using hibernate tool present in JBoss Tools.

My Setup :
1> Eclipse Java EE IDE for Web Developers. ( Version: Indigo Service Release 2 Build id: 20120216-1857 )
contains Hibernate Tools 3.4.0.v20120504-2121-H72-Beta3 JBoss by Red Hat

I had downloaded eclipse indigo mentioned above and had got jboss tools installed over it from update site ( ... nt/indigo/)
I had created Hibernate Console Configuration and could see the tables in eclipse which were created in postgreSQL database.
Now i wish to generate the .java, .hbm.xml, DAO files using Hibernate Code generation Configurations.
When i run the code generation, it gives me following error.

java.lang.IllegalStateException: zip file closed
at Source)
at Source)
at java.util.jar.JarFile.getEntry(Unknown Source)
at java.util.jar.JarFile.getJarEntry(Unknown Source)
at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source)
at sun.misc.URLClassPath.getResource(Unknown Source)
at$ Source)
at Method)
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.postgresql.Driver.getDefaultProperties(
at org.postgresql.Driver.connect(
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(
at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getConnection(
at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getMetaData(
at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.caseForSearch(
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(
at org.hibernate.cfg.reveng.JDBCReader.processTables(
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(
at org.hibernate.cfg.JDBCBinder.readFromDatabase(
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(
at org.hibernate.console.execution.DefaultExecutionContext.execute(
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(
at org.eclipse.debug.internal.ui.DebugUIPlugin$

Session Data
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_IN
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

Please suggest possible solutions to this problem.

I agree. Here's the link:
subject: java.lang.IllegalStateException: zip file closed
jQuery in Action, 3rd edition