JBoss Community

JBDS 5.0 Beta 3 : JPA Tooling throwing exception

created by Vimal Kansal in JBoss Tools - View the full discussion

Hi,

 

 

I created a JEE6 webapp using integrated maven with its Jee6 web app plugin. I checked in the generated project, JPA 2.0 facet is set. I edited the hibernate console configuration and actually able to ping the database and see the tables in hibernate perspective. Now when I invoke, "Generate Entities From tables", I get the following exception (My environment in RHEL 6.2, jdk 1.6, JBDS 5 Beta3) :

 

org.eclipse.core.runtime.CoreException: java.lang.IllegalStateException: zip file closed

    at org.jboss.tools.hibernate4_0.console.ConsoleExtension4_0.launchExporters(ConsoleExtension4_0.java:145)

    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.core.LaunchConfiguration.launch(LaunchConfiguration.java:696)

    at org.jboss.tools.hibernate.jpt.ui.wizard.GenerateEntitiesWizard.performFinish(GenerateEntitiesWizard.java:74)

    at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)

    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)

    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)

    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at org.jboss.tools.hibernate.jpt.ui.internal.platform.HibernateJpaPlatformUi.generateEntities(HibernateJpaPlatformUi.java:56)

    at org.eclipse.jpt.jpa.ui.internal.actions.GenerateEntitiesAction.execute(GenerateEntitiesAction.java:24)

    at org.eclipse.jpt.jpa.ui.internal.actions.ProjectAction.execute(ProjectAction.java:87)

    at org.eclipse.jpt.jpa.ui.internal.actions.ProjectAction.execute(ProjectAction.java:63)

    at org.eclipse.jpt.jpa.ui.internal.actions.ProjectAction.run(ProjectAction.java:55)

    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)

    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)

    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)

    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)

    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)

    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)

    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)

    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)

    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)

    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)

    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)

    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)

    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

Caused by: java.lang.IllegalStateException: zip file closed

    at java.util.zip.ZipFile.ensureOpen(ZipFile.java:415)

    at java.util.zip.ZipFile.getEntry(ZipFile.java:160)

    at java.util.jar.JarFile.getEntry(JarFile.java:208)

    at java.util.jar.JarFile.getJarEntry(JarFile.java:191)

    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:757)

    at sun.misc.URLClassPath.getResource(URLClassPath.java:169)

    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

    at org.jboss.tools.hibernate4_0.HibernateExtension4_0$5$1.findClass(HibernateExtension4_0.java:167)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

    at org.jboss.tools.hibernate4_0.HibernateExtension4_0$5$1.loadClass(HibernateExtension4_0.java:178)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

    at org.jboss.tools.hibernate4_0.HibernateExtension4_0$5$1.loadClass(HibernateExtension4_0.java:186)

    at org.postgresql.Driver.getDefaultProperties(Driver.java:85)

    at org.postgresql.Driver.connect(Driver.java:231)

    at org.jboss.tools.hibernate4_0.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:42)

    at java.sql.DriverManager.getConnection(DriverManager.java:582)

    at java.sql.DriverManager.getConnection(DriverManager.java:154)

    at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173)

    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:124)

    at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:92)

    at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:75)

    at org.jboss.tools.hibernate4_0.console.ConsoleExtension4_0$3.execute(ConsoleExtension4_0.java:269)

    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)

    at org.jboss.tools.hibernate4_0.HibernateExtension4_0.execute(HibernateExtension4_0.java:211)

    at org.jboss.tools.hibernate4_0.console.ConsoleExtension4_0.buildConfiguration(ConsoleExtension4_0.java:237)

    at org.jboss.tools.hibernate4_0.console.ConsoleExtension4_0.runExporters(ConsoleExtension4_0.java:167)

    at org.jboss.tools.hibernate4_0.console.ConsoleExtension4_0.launchExporters(ConsoleExtension4_0.java:126)

    ... 49 more

Contains: java.lang.IllegalStateException: zip file closed

java.lang.IllegalStateException: zip file closed

    at java.util.zip.ZipFile.ensureOpen(ZipFile.java:415)

    at java.util.zip.ZipFile.getEntry(ZipFile.java:160)

    at java.util.jar.JarFile.getEntry(JarFile.java:208)

    at java.util.jar.JarFile.getJarEntry(JarFile.java:191)

    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:757)

    at sun.misc.URLClassPath.getResource(URLClassPath.java:169)

    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

    at org.jboss.tools.hibernate4_0.HibernateExtension4_0$5$1.findClass(HibernateExtension4_0.java:167)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

    at org.jboss.tools.hibernate4_0.HibernateExtension4_0$5$1.loadClass(HibernateExtension4_0.java:178)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

    at org.jboss.tools.hibernate4_0.HibernateExtension4_0$5$1.loadClass(HibernateExtension4_0.java:186)

    at org.postgresql.Driver.getDefaultProperties(Driver.java:85)

    at org.postgresql.Driver.connect(Driver.java:231)

    at org.jboss.tools.hibernate4_0.FakeDelegatingDriver.connect(FakeDelegatingDriver.java:42)

    at java.sql.DriverManager.getConnection(DriverManager.java:582)

    at java.sql.DriverManager.getConnection(DriverManager.java:154)

    at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173)

    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:124)

    at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:92)

    at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:75)

    at org.jboss.tools.hibernate4_0.console.ConsoleExtension4_0$3.execute(ConsoleExtension4_0.java:269)

    at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)

    at org.jboss.tools.hibernate4_0.HibernateExtension4_0.execute(HibernateExtension4_0.java:211)

    at org.jboss.tools.hibernate4_0.console.ConsoleExtension4_0.buildConfiguration(ConsoleExtension4_0.java:237)

    at org.jboss.tools.hibernate4_0.console.ConsoleExtension4_0.runExporters(ConsoleExtension4_0.java:167)

    at org.jboss.tools.hibernate4_0.console.ConsoleExtension4_0.launchExporters(ConsoleExtension4_0.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.core.LaunchConfiguration.launch(LaunchConfiguration.java:696)

    at org.jboss.tools.hibernate.jpt.ui.wizard.GenerateEntitiesWizard.performFinish(GenerateEntitiesWizard.java:74)

    at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)

    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)

    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)

    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)

    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

    at org.eclipse.jface.window.Window.open(Window.java:801)

    at org.jboss.tools.hibernate.jpt.ui.internal.platform.HibernateJpaPlatformUi.generateEntities(HibernateJpaPlatformUi.java:56)

    at org.eclipse.jpt.jpa.ui.internal.actions.GenerateEntitiesAction.execute(GenerateEntitiesAction.java:24)

    at org.eclipse.jpt.jpa.ui.internal.actions.ProjectAction.execute(ProjectAction.java:87)

    at org.eclipse.jpt.jpa.ui.internal.actions.ProjectAction.execute(ProjectAction.java:63)

    at org.eclipse.jpt.jpa.ui.internal.actions.ProjectAction.run(ProjectAction.java:55)

    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)

    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)

    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)

    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)

    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)

    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)

    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)

    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)

    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)

    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)

    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)

    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)

    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

Reply to this message by going to Community

Start a new discussion in JBoss Tools at Community