Page 1 of 1

[hibernatetool] java.util.zip.ZipException: error in opening

Posted: Fri May 18, 2012 7:17 am
by skip
Hi

I get the following error when I run the

Code: Select all

build-sql
ant task.

Error:

Code: Select all

[hibernatetool] ERROR [main] (Ejb3Configuration.java:847) - Container is providing a null PersistenceUnitRootUrl: discovery impossible
[hibernatetool] java.util.zip.ZipException: error in opening zip file
[hibernatetool]    at java.util.zip.ZipFile.open(Native Method)
[hibernatetool]    at java.util.zip.ZipFile.<init>(ZipFile.java:114)
[hibernatetool]    at java.util.zip.ZipFile.<init>(ZipFile.java:131)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1028)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader.getResource(AntClassLoader.java:934)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader.getResource(AntClassLoader.java:920)
[hibernatetool]    at java.lang.ClassLoader.getResource(ClassLoader.java:953)
[hibernatetool]    at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1148)
[hibernatetool]    at org.hibernate.ejb.Ejb3Configuration.addXMLEntities(Ejb3Configuration.java:727)
[hibernatetool]    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:601)
[hibernatetool]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hibernatetool]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[hibernatetool]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[hibernatetool]    at java.lang.reflect.Method.invoke(Method.java:597)
[hibernatetool]    at org.broadleafcommerce.common.util.sql.JPAConfigurationTask.createConfiguration(JPAConfigurationTask.java:74)
[hibernatetool]    at org.broadleafcommerce.common.util.sql.HibernateToolTask.execute(HibernateToolTask.java:161)
[hibernatetool]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[hibernatetool]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hibernatetool]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[hibernatetool]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[hibernatetool]    at java.lang.reflect.Method.invoke(Method.java:597)
[hibernatetool]    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[hibernatetool]    at org.apache.tools.ant.Task.perform(Task.java:348)
[hibernatetool]    at org.apache.tools.ant.Target.execute(Target.java:357)
[hibernatetool]    at org.apache.tools.ant.Target.performTasks(Target.java:385)
[hibernatetool]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[hibernatetool]    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[hibernatetool]    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[hibernatetool]    at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[hibernatetool]    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
[hibernatetool]    at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
[hibernatetool]    at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)


Could someone why am I getting this error and how to resolve it?

Thanks.

Re: [hibernatetool] java.util.zip.ZipException: error in opening

Posted: Sat May 26, 2012 6:47 pm
by jefffischer
Does the process complete and generate the SQL files? You should be able to safely ignore this message. I believe we address this issue in later versions so that these annoying messages don't show up in the log anymore during the SQL generation.

Re: [hibernatetool] java.util.zip.ZipException: error in opening

Posted: Sat May 26, 2012 11:14 pm
by skip
Hi jefffischer

Yes the build succeeded with schema being generated but there was no data in the database and just the tables. And I also used to get the following message at the end of the logging:

Code: Select all

[hibernatetool] DEBUG [main] (SchemaExport.java:252) - import file not found: /import.sql


At this point I was not able to run the application even with hsqldb either and was having some issues with my computer not being able to use hsqldb database for some un-understood reasons so I moved to MySQL 5.5 which din't work either and hence was the post.

But now I am able to run the myecommerce-app with hsqldb successfully and I haven't tried that working application with MySQL yet.

I will be sharing the result of moving to MySQL 5.5 database as soon as I do that with the working application.

Many thanks for the reply again :)