-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Cannot retrieve DB schema via hibernate tool with eclipse
PostPosted: Wed May 18, 2011 5:48 am 
Newbie

Joined: Wed May 18, 2011 5:39 am
Posts: 3
I'm using hibernate Tools 3.4 with Eclipse (springsource) 3.6 link up with MSSQL2005.

My problem is I can pass the ping test but I cannot get the db schema in "Hibernate Configuration" -> "Database".

When I right click the "Database" and select "Refresh", following error is thrown.

Code:
java.lang.IllegalStateException: zip file closed

java.lang.IllegalStateException: zip file closed
   at java.util.zip.ZipFile.ensureOpen(ZipFile.java:416)
   at java.util.zip.ZipFile.getEntry(ZipFile.java:161)
   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.hibernate.console.ConsoleConfiguration$2$1.findClass(ConsoleConfiguration.java:176)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at org.hibernate.console.ConsoleConfiguration$2$1.loadClass(ConsoleConfiguration.java:184)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
   at org.hibernate.console.ConsoleConfiguration$2$1.loadClass(ConsoleConfiguration.java:192)
   at com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareCall(SQLServerConnection.java:1850)
   at com.microsoft.sqlserver.jdbc.SQLServerConnection.prepareCall(SQLServerConnection.java:1558)
   at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData$CallableHandles.prepare(SQLServerDatabaseMetaData.java:50)
   at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getCallableStatementHandle(SQLServerDatabaseMetaData.java:249)
   at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getResultSetFromStoredProc(SQLServerDatabaseMetaData.java:277)
   at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getResultSetWithProvidedColumnNames(SQLServerDatabaseMetaData.java:300)
   at com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData.getTables(SQLServerDatabaseMetaData.java:450)
   at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect.getTables(JDBCMetaDataDialect.java:28)
   at org.hibernate.cfg.reveng.JDBCReader.processTables(JDBCReader.java:476)
   at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:74)
   at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$2.execute(LazyDatabaseSchemaWorkbenchAdapter.java:117)
   at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
   at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:72)
   at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:106)
   at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:63)
   at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
   at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Am I missing something?

Regards,
Benny


Top
 Profile  
 
 Post subject: Re: Cannot retrieve DB schema via hibernate tool with eclipse
PostPosted: Thu Jul 21, 2011 11:55 pm 
Newbie

Joined: Thu Jul 21, 2011 11:53 pm
Posts: 2
I got the same question.


Top
 Profile  
 
 Post subject: Re: Cannot retrieve DB schema via hibernate tool with eclipse
PostPosted: Fri Jul 22, 2011 3:58 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Seems like plugins can't load one of the necessary classes because the referenced jar is locked.
Do you have all necessary jar in your project?(other applications don't use them)


Top
 Profile  
 
 Post subject: Re: Cannot retrieve DB schema via hibernate tool with eclipse
PostPosted: Fri Jul 22, 2011 6:06 am 
Newbie

Joined: Thu Jul 21, 2011 11:53 pm
Posts: 2
Dmitry Geraskov wrote:
Seems like plugins can't load one of the necessary classes because the referenced jar is locked.
Do you have all necessary jar in your project?(other applications don't use them)


maybe. After restart eclipse, this did not reproduce again.


Top
 Profile  
 
 Post subject: Re: Cannot retrieve DB schema via hibernate tool with eclipse
PostPosted: Fri Jul 22, 2011 6:15 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Nice you have found this workaround :)


Top
 Profile  
 
 Post subject: Re: Cannot retrieve DB schema via hibernate tool with eclipse
PostPosted: Thu May 24, 2012 7:39 am 
Newbie

Joined: Thu May 24, 2012 6:34 am
Posts: 3
Hello all,

I am facing problem to generate java & hbm files while using hibernate tool from jboss tools.
exact description here.
viewtopic.php?f=6&t=1015576

I tried restarting eclipse but the problem doesnot resolve.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.