-->
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.  [ 1 post ] 
Author Message
 Post subject: [hibernatetool] java.util.zip.ZipException: error in opening
PostPosted: Tue May 22, 2012 3:36 pm 
Newbie

Joined: Tue Aug 24, 2010 7:24 am
Posts: 9
Hi

I am trying to run build-sql ant task which is giving me following error and I've not been able to figure out the cause behind it.

Code:
[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:127)
[hibernatetool]    at java.util.zip.ZipFile.<init>(ZipFile.java:143)
[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:997)
[hibernatetool]    at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1192)
[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)
[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:127)
[hibernatetool]    at java.util.zip.ZipFile.<init>(ZipFile.java:143)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1028)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:147)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.<init>(AntClassLoader.java:109)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:975)
[hibernatetool]    at java.lang.ClassLoader.getResources(ClassLoader.java:1040)
[hibernatetool]    at javax.xml.xpath.SecuritySupport$6.run(SecuritySupport.java:126)
[hibernatetool]    at java.security.AccessController.doPrivileged(Native Method)
[hibernatetool]    at javax.xml.xpath.SecuritySupport.getResources(SecuritySupport.java:119)
[hibernatetool]    at javax.xml.xpath.XPathFactoryFinder.createServiceFileIterator(XPathFactoryFinder.java:493)
[hibernatetool]    at javax.xml.xpath.XPathFactoryFinder._newFactory(XPathFactoryFinder.java:217)
[hibernatetool]    at javax.xml.xpath.XPathFactoryFinder.newFactory(XPathFactoryFinder.java:143)
[hibernatetool]    at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:185)
[hibernatetool]    at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:99)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergePoint.<init>(MergePoint.java:58)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergeManager.merge(MergeManager.java:124)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergeXmlConfigResource.mergeItems(MergeXmlConfigResource.java:108)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergeXmlConfigResource.merge(MergeXmlConfigResource.java:90)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.MergeApplicationContextXmlConfigResource.getConfigResources(MergeApplicationContextXmlConfigResource.java:56)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.MergeFileSystemAndClassPathXMLApplicationContext.<init>(MergeFileSystemAndClassPathXMLApplicationContext.java:80)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.MergeFileSystemAndClassPathXMLApplicationContext.<init>(MergeFileSystemAndClassPathXMLApplicationContext.java:57)
[hibernatetool]    at org.broadleafcommerce.common.util.sql.HibernateToolTask.execute(HibernateToolTask.java:142)
[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)
[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:127)
[hibernatetool]    at java.util.zip.ZipFile.<init>(ZipFile.java:143)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1028)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:147)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.<init>(AntClassLoader.java:109)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:975)
[hibernatetool]    at java.lang.ClassLoader.getResources(ClassLoader.java:1040)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:979)
[hibernatetool]    at java.lang.ClassLoader.getResources(ClassLoader.java:1040)
[hibernatetool]    at javax.xml.xpath.SecuritySupport$6.run(SecuritySupport.java:126)
[hibernatetool]    at java.security.AccessController.doPrivileged(Native Method)
[hibernatetool]    at javax.xml.xpath.SecuritySupport.getResources(SecuritySupport.java:119)
[hibernatetool]    at javax.xml.xpath.XPathFactoryFinder.createServiceFileIterator(XPathFactoryFinder.java:493)
[hibernatetool]    at javax.xml.xpath.XPathFactoryFinder._newFactory(XPathFactoryFinder.java:217)
[hibernatetool]    at javax.xml.xpath.XPathFactoryFinder.newFactory(XPathFactoryFinder.java:143)
[hibernatetool]    at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:185)
[hibernatetool]    at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:99)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergePoint.<init>(MergePoint.java:58)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergeManager.merge(MergeManager.java:124)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergeXmlConfigResource.mergeItems(MergeXmlConfigResource.java:108)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergeXmlConfigResource.merge(MergeXmlConfigResource.java:90)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.MergeApplicationContextXmlConfigResource.getConfigResources(MergeApplicationContextXmlConfigResource.java:56)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.MergeFileSystemAndClassPathXMLApplicationContext.<init>(MergeFileSystemAndClassPathXMLApplicationContext.java:80)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.MergeFileSystemAndClassPathXMLApplicationContext.<init>(MergeFileSystemAndClassPathXMLApplicationContext.java:57)
[hibernatetool]    at org.broadleafcommerce.common.util.sql.HibernateToolTask.execute(HibernateToolTask.java:142)
[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)
[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:127)
[hibernatetool]    at java.util.zip.ZipFile.<init>(ZipFile.java:143)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1028)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:147)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.<init>(AntClassLoader.java:109)
[hibernatetool]    at org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:975)
[hibernatetool]    at java.lang.ClassLoader.getResources(ClassLoader.java:1040)
[hibernatetool]    at javax.xml.xpath.SecuritySupport$6.run(SecuritySupport.java:126)
[hibernatetool]    at java.security.AccessController.doPrivileged(Native Method)
[hibernatetool]    at javax.xml.xpath.SecuritySupport.getResources(SecuritySupport.java:119)
[hibernatetool]    at javax.xml.xpath.XPathFactoryFinder.createServiceFileIterator(XPathFactoryFinder.java:493)
[hibernatetool]    at javax.xml.xpath.XPathFactoryFinder._newFactory(XPathFactoryFinder.java:217)
[hibernatetool]    at javax.xml.xpath.XPathFactoryFinder.newFactory(XPathFactoryFinder.java:143)
[hibernatetool]    at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:185)
[hibernatetool]    at javax.xml.xpath.XPathFactory.newInstance(XPathFactory.java:99)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergePoint.<init>(MergePoint.java:58)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergeManager.merge(MergeManager.java:124)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergeXmlConfigResource.mergeItems(MergeXmlConfigResource.java:108)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.merge.MergeXmlConfigResource.merge(MergeXmlConfigResource.java:90)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.MergeApplicationContextXmlConfigResource.getConfigResources(MergeApplicationContextXmlConfigResource.java:56)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.MergeFileSystemAndClassPathXMLApplicationContext.<init>(MergeFileSystemAndClassPathXMLApplicationContext.java:80)
[hibernatetool]    at org.broadleafcommerce.common.extensibility.context.MergeFileSystemAndClassPathXMLApplicationContext.<init>(MergeFileSystemAndClassPathXMLApplicationContext.java:57)
[hibernatetool]    at org.broadleafcommerce.common.util.sql.HibernateToolTask.execute(HibernateToolTask.java:142)
[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)
[hibernatetool] [ WARN] 01:26:44 Ejb3Configuration - hibernate.connection.autocommit = false break the EJB3 specification
[hibernatetool] create table BLC_ADDITIONAL_OFFER_INFO (BLC_ORDER_ORDER_ID bigint not null, OFFER_INFO_ID bigint not null, OFFER_ID bigint not null, primary key (BLC_ORDER_ORDER_ID, OFFER_ID));
[hibernatetool] create table BLC_ADDRESS (ADDRESS_ID bigint not null, ADDRESS_LINE1 varchar(255) not null, ADDRESS_LINE2 varchar(255), CITY varchar(255) not null, COMPANY_NAME varchar(255), COUNTY varchar(255), FIRST_NAME varchar(255), IS_ACTIVE bit, IS_BUSINESS bit, IS_DEFAULT bit, LAST_NAME varchar(255), POSTAL_CODE varchar(255) not null, PRIMARY_PHONE varchar(255), SECONDARY_PHONE varchar(255), STANDARDIZED bit, TOKENIZED_ADDRESS varchar(255), VERIFICATION_LEVEL varchar(255), ZIP_FOUR varchar(255), COUNTRY varchar(255) not null, STATE_PROV_REGION varchar(255), primary key (ADDRESS_ID));
[hibernatetool] create table BLC_ADMIN_PASSWORD_TOKEN (PASSWORD_TOKEN varchar(255) not null, ADMIN_USER_ID bigint not null, CREATE_DATE timestamp not null, TOKEN_USED_DATE timestamp, TOKEN_USED_FLAG bit not null, primary key (PASSWORD_TOKEN));
[hibernatetool] create table BLC_ADMIN_PERMISSION (ADMIN_PERMISSION_ID bigint not null, DESCRIPTION varchar(255) not null, NAME varchar(255) not null, PERMISSION_TYPE varchar(255) not null, primary key (ADMIN_PERMISSION_ID));
[hibernatetool] create table BLC_ADMIN_PERMISSION_ENTITY (ADMIN_PERMISSION_ENTITY_ID bigint not null, CEILING_ENTITY varchar(255) not null, ADMIN_PERMISSION_ID bigint, primary key (ADMIN_PERMISSION_ENTITY_ID));
[hibernatetool] create table BLC_ADMIN_ROLE (ADMIN_ROLE_ID bigint not null, DESCRIPTION varchar(255) not null, NAME varchar(255) not null, primary key (ADMIN_ROLE_ID));
[hibernatetool] alter table BLC_ADMIN_USER_PERMISSION_XREF add constraint FKF0B3BEEDE88B7D38 foreign key (ADMIN_PERMISSION_ID) references BLC_ADMIN_PERMISSION;
[hibernatetool] alter table BLC_ADMIN_USER_ROLE_XREF add constraint FKFFD33A265F43AAD8 foreign key (ADMIN_ROLE_ID) references BLC_ADMIN_ROLE;
[hibernatetool] alter table BLC_ADMIN_USER_ROLE_XREF add constraint FKFFD33A2646EBC38 foreign key (ADMIN_USER_ID) references BLC_ADMIN_USER;
[hibernatetool] alter table BLC_ADMIN_USER_SANDBOX add constraint FKD0A97E0946EBC38 foreign key (ADMIN_USER_ID) references BLC_ADMIN_USER;
[hibernatetool] alter table BLC_ADMIN_USER_SANDBOX add constraint FKD0A97E099B942795 foreign key (SANDBOX_ID) references BLC_SANDBOX;
[hibernatetool] create index SHORT_DESCRIPTION_INDEX on BLC_AMOUNT_ITEM (SHORT_DESCRIPTION);
[hibernatetool] create index AMOUNTITEM_PAYMENTINFO_INDEX on BLC_AMOUNT_ITEM (PAYMENT_ID);
[hibernatetool] alter table BLC_AMOUNT_ITEM add constraint FKB98530944BC71D98 foreign key (PAYMENT_ID) references BLC_ORDER_PAYMENT;
[hibernatetool] alter table BLC_ASSET_DESC_MAP add constraint FKE886BAE367F70B63 foreign key (STATIC_ASSET_ID) references BLC_STATIC_ASSET;
[hibernatetool] alter table BLC_ASSET_DESC_MAP add constraint FKE886BAE3E2BA0C9D foreign key (STATIC_ASSET_DESC_ID) references BLC_STATIC_ASSET_DESC;
[hibernatetool] alter table BLC_BUNDLE_ORDER_ITEM add constraint FK489703DB9AF166DF foreign key (ORDER_ITEM_ID) references BLC_ORDER_ITEM;
[hibernatetool] Executing Hibernate Tool with a JPA Configuration
[hibernatetool] 3. task: hbm2ddl (Generates database schema)
[hibernatetool] [ERROR] 01:26:44 Ejb3Configuration - 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:127)
[hibernatetool]    at java.util.zip.ZipFile.<init>(ZipFile.java:143)
[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:997)
[hibernatetool]    at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1192)
[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)
[hibernatetool] [ WARN] 01:26:44 Ejb3Configuration - hibernate.connection.autocommit = false break the EJB3 specification
[hibernatetool] create table BLC_STATIC_ASSET_STRG (STATIC_ASSET_STRG_ID bigint not null, FILE_DATA blob, STATIC_ASSET_ID bigint not null, primary key (STATIC_ASSET_STRG_ID));
[hibernatetool] create index STATIC_ASSET_ID_INDEX on BLC_STATIC_ASSET_STRG (STATIC_ASSET_ID);
[hibernatetool] create table SEQUENCE_GENERATOR ( ID_NAME varchar(255),  ID_VAL integer ) ;
BUILD SUCCESSFUL
Total time: 26 seconds


Following is the build-sql ant task:
Code:
    <target name="build-sql">
        <!--
            You will need to run a mvn install on your project before attempting to execute this task.
            Also, you will likely need to assign additional heap space to your ANT process. A setting
            of -XX:MaxPermSize=256M -Xmx512M should be sufficient.
        -->
        <mkdir dir="target/sql"/>
        <artifact:pom id="myPom" file="pom.xml" />
        <artifact:dependencies filesetId="pomDeps" pomRefId="myPom" useScope="compile" />
        <property name="baseTarget" location="target/${myPom.build.finalName}/WEB-INF"/>
        <fileset id="libDir" dir="${baseTarget}/lib"/>
        <path id="build.runtime.classpath">
            <!--There are some additional libraries needed at compile time that are not included
                in WEB-INF/lib - find those libraries via a difference algorithm-->
            <restrict>
                <difference>
                    <fileset refid="pomDeps" />
                    <intersect>
                        <fileset refid="pomDeps" />
                        <fileset refid="libDir" />
                    </intersect>
                </difference>
                <rsel:not>
                    <rsel:name name="**/*.pom" />
                </rsel:not>
            </restrict>
            <!--Add the lib directory to get all the dependencies required for the demo app-->
            <fileset refid="libDir"/>
            <!--Add the classes directory in the war project, if required-->
            <!--<pathelement location="${baseTarget}/classes"/>-->
        </path>
        <!--If the war project does not contain custom entities (best practice), then it is not necessary to include application context from the WEB-INF directory-->
        <!--<property name="my.app.context" location="src/main/webapp/WEB-INF/applicationContext.xml"/>-->
        <taskdef name="hibernatetool" classname="org.broadleafcommerce.common.util.sql.HibernateToolTask" classpathref="build.runtime.classpath" />
        <hibernatetool destDir="target/sql" combinePersistenceUnits="false" refineFileNames="true">
            <!--add in additional persistence configuration related to the admin -->
            <classPathApplicationContext path="bl-open-admin-contentClient-applicationContext.xml"/>
            <!--add in additional persistence configuration related to the cms -->
            <classPathApplicationContext path="bl-cms-contentClient-applicationContext.xml"/>
            <!--add in additional persistence configuration for our core -->
            <classPathApplicationContext path="mycompany-applicationContext.xml"/>
            <!--see description for my.app.context above -->
            <!--<fileSystemApplicationContext path="${my.app.context}"/>-->
            <!--select the dialects and persistence units to export-->
            <jpaconfiguration persistenceUnit="blPU" dialect="org.hibernate.dialect.HSQLDialect" />
            <jpaconfiguration persistenceUnit="blSecurePU" dialect="org.hibernate.dialect.HSQLDialect" />
            <jpaconfiguration persistenceUnit="blCMSStorage" dialect="org.hibernate.dialect.HSQLDialect" />
            <!--other required elements-->
            <classpath refid="build.runtime.classpath" />
            <hbm2ddl export="false"/>
        </hibernatetool>
    </target>


Could someone help me out with it.

Thanks.


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

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.