aspose file tools*
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
Author

java.lang.IllegalStateException: zip file closed

Vilpesh Mistry
Ranch Hand

Joined: May 27, 2003
Posts: 62
Hello,

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 org.hibernate.eclipse.feature.feature.group JBoss by Red Hat

I had downloaded eclipse indigo mentioned above and had got jboss tools installed over it from update site (http://download.jboss.org/jbosstools/up ... 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 java.util.zip.ZipFile.ensureOpen(Unknown Source)
at java.util.zip.ZipFile.getEntry(Unknown 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 java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at org.jboss.tools.hibernate3_6.HibernateExtension3_6$5$1.findClass(HibernateExtension3_6.java:157)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.jboss.tools.hibernate3_6.HibernateExtension3_6$5$1.loadClass(HibernateExtension3_6.java:168)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.jboss.tools.hibernate3_6.HibernateExtension3_6$5$1.loadClass(HibernateExtension3_6.java:176)
at org.postgresql.Driver.getDefaultProperties(Driver.java:85)
at org.postgresql.Driver.connect(Driver.java:231)
at org.jboss.tools.hibernate3_6.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:31)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getConnection(AbstractMetaDataDialect.java:121)
at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.getMetaData(AbstractMetaDataDialect.java:60)
at org.hibernate.cfg.reveng.dialect.AbstractMetaDataDialect.caseForSearch(AbstractMetaDataDialect.java:163)
at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:22)
at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:476)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74)
at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:860)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:120)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:93)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:43)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6$3.execute(ConsoleExtension3_6.java:271)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.jboss.tools.hibernate3_6.HibernateExtension3_6.execute(HibernateExtension3_6.java:201)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.buildConfiguration(ConsoleExtension3_6.java:239)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.runExporters(ConsoleExtension3_6.java:169)
at org.jboss.tools.hibernate3_6.console.ConsoleExtension3_6.launchExporters(ConsoleExtension3_6.java:126)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:270)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:937)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1141)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Session Data
eclipse.buildId=M20120208-0800
java.version=1.6.0_32
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.


Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.IllegalStateException: zip file closed