Exception java.util.zip.ZipFile.ensureOpenOrZipExc

2019-02-21 04:33发布

问题:

When I am deploying an application on WebSphere Application Server 7.0 , I am getting below exception and its taking too much time to deploy. After few deployments the server start generating heap dumps and running out of memory. In our application we are using JAX-WS for generating Web Service Clients. We are also using JSF 1.2 for view. Any suggestion is appreciated.

000000ff annotations   E ClassScanner scanInputStream Exception occurred while scanning input stream:{0}
                                 java.util.zip.ZipException: ZipFile closed
    at java.util.zip.ZipFile.ensureOpenOrZipException(ZipFile.java:424)
    at java.util.zip.ZipFile.access$1100(ZipFile.java:40)
    at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:456)
    at java.util.zip.ZipFile$1.fill(ZipFile.java:241)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:229)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:269)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:328)
    at java.io.FilterInputStream.read(FilterInputStream.java:127)
    at java.io.PushbackInputStream.read(PushbackInputStream.java:180)
    at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:232)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152)
    at java.util.zip.ZipInputStream.read(ZipInputStream.java:157)
    at java.io.FilterInputStream.read(FilterInputStream.java:127)
    at org.objectweb.asm.ClassReader.a(Unknown Source)
    at org.objectweb.asm.ClassReader.<init>(Unknown Source)
    at com.ibm.ws.amm.scan.util.ClassScanner.scanInputStream(ClassScanner.java:231)
    at com.ibm.ws.amm.AnnotativeMetadataManagerImpl$1.applyTo(AnnotativeMetadataManagerImpl.java:259)
    at com.ibm.wsspi.amm.scan.context.ArchiveInputStreamData.iterate(ArchiveInputStreamData.java:241)
    at com.ibm.ws.amm.AnnotativeMetadataManagerImpl.scan(AnnotativeMetadataManagerImpl.java:257)
    at com.ibm.ws.amm.AnnotativeMetadataManagerImpl.scan(AnnotativeMetadataManagerImpl.java:218)
    at com.ibm.ws.amm.commonarchive.AnnotationsProcessorImpl.merge(AnnotationsProcessorImpl.java:108)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.processAnnotations(WARFileImpl.java:297)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.getDeploymentDescriptor(WARFileImpl.java:243)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.getDeploymentDescriptor(WARFileImpl.java:173)
    at com.ibm.etools.commonarchive.impl.WARFileImpl.getExtensions(WARFileImpl.java:440)
    at com.ibm.etools.commonarchive.impl.WARFileImpl.getContextRoot(WARFileImpl.java:736)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.Ear50NoDDImportStrategyImpl.loadDeploymentDescriptor(Ear50NoDDImportStrategyImpl.java:388)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.Ear50NoDDImportStrategyImpl.importMetaData(Ear50NoDDImportStrategyImpl.java:253)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EARFileImpl.getDeploymentDescriptor(EARFileImpl.java:377)
    at com.ibm.etools.commonarchive.impl.EARFileImpl.initializeModuleExtensions(EARFileImpl.java:641)
    at com.ibm.etools.commonarchive.impl.EARFileImpl.initializeAfterOpen(EARFileImpl.java:720)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl.openSpecificArchive(CommonarchiveFactoryImpl.java:1517)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl.openEARFile(CommonarchiveFactoryImpl.java:1205)
    at com.ibm.etools.commonarchive.impl.CommonarchiveFactoryImpl.openEARFile(CommonarchiveFactoryImpl.java:552)
    at com.ibm.ws.management.application.client.AppInstallHelper.getArchive(AppInstallHelper.java:271)
    at com.ibm.ws.management.application.client.AppInstallHelper.getEarFile(AppInstallHelper.java:157)
    at com.ibm.ws.webservices.admin.utils.CommonUtils.getMergeEar(CommonUtils.java:450)
    at com.ibm.ws.webservices.admin.deploy.ServiceIndexServerTask.performTask(ServiceIndexServerTask.java:126)
    at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:284)
    at java.lang.Thread.run(Thread.java:735)

[9/13/12 12:00:44:138 IST] 000000ff annotations   E ArchiveInputStreamData iterate unable to open file iterator
                                 java.util.zip.ZipException: ZipFile closed
    at java.util.zip.ZipFile.ensureOpenOrZipException(ZipFile.java:424)
    at java.util.zip.ZipFile.access$1100(ZipFile.java:40)
    at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:456)
    at java.util.zip.ZipFile$1.fill(ZipFile.java:241)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:229)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:269)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:328)
    at java.io.FilterInputStream.read(FilterInputStream.java:127)
    at java.io.PushbackInputStream.read(PushbackInputStream.java:180)
    at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:232)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152)
    at java.util.zip.ZipInputStream.read(ZipInputStream.java:157)
    at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:103)
    at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:81)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.NestedArchiveIteratorDirect.getInputStream(NestedArchiveIteratorDirect.java:117)
    at com.ibm.wsspi.amm.scan.context.ArchiveInputStreamData.iterate(ArchiveInputStreamData.java:238)
    at com.ibm.ws.amm.AnnotativeMetadataManagerImpl.scan(AnnotativeMetadataManagerImpl.java:257)
    at com.ibm.ws.amm.AnnotativeMetadataManagerImpl.scan(AnnotativeMetadataManagerImpl.java:218)
    at com.ibm.ws.amm.commonarchive.AnnotationsProcessorImpl.merge(AnnotationsProcessorImpl.java:108)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.processAnnotations(WARFileImpl.java:297)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.getDeploymentDescriptor(WARFileImpl.java:243)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.WARFileImpl.getDeploymentDescriptor(WARFileImpl.java:173)
    at com.ibm.etools.commonarchive.impl.WARFileImpl.getExtensions(WARFileImpl.java:440)
    at com.ibm.etools.commonarchive.impl.WARFileImpl.getContextRoot(WARFileImpl.java:736)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.Ear50NoDDImportStrategyImpl.loadDeploymentDescriptor(Ear50NoDDImportStrategyImpl.java:388)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.Ear50NoDDImportStrategyImpl.importMetaData(Ear50NoDDImportStrategyImpl.java:253)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.EARFileImpl.getDeploymentDescriptor(EARFileImpl.java:377)
    at com.ibm.etools.commonarchive.impl.EARFileImpl.initializeModuleExtensions(EARFileImpl.java:641)
    at com.ibm.etools.commonarchive.impl.EARFileImpl.initializeAfterOpen(EARFileImpl.java:720)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl.openSpecificArchive(CommonarchiveFactoryImpl.java:1517)
    at org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl.openEARFile(CommonarchiveFactoryImpl.java:1205)
    at com.ibm.etools.commonarchive.impl.CommonarchiveFactoryImpl.openEARFile(CommonarchiveFactoryImpl.java:552)
    at com.ibm.ws.management.application.client.AppInstallHelper.getArchive(AppInstallHelper.java:271)
    at com.ibm.ws.management.application.client.AppInstallHelper.getEarFile(AppInstallHelper.java:157)
    at com.ibm.ws.webservices.admin.utils.CommonUtils.getMergeEar(CommonUtils.java:450)
    at com.ibm.ws.webservices.admin.deploy.ServiceIndexServerTask.performTask(ServiceIndexServerTask.java:126)
    at com.ibm.ws.management.application.SchedulerImpl.run(SchedulerImpl.java:284)
    at java.lang.Thread.run(Thread.java:735)

回答1:

Yeeh,

Finally got the solution after a long R&D :)

Below link contain useful information.

http://www-01.ibm.com/support/docview.wss?uid=swg1PK85322

What we did just change the module level of application to 2.4 and placed wsdl folder under WebContent. The main issue was due to annotation processing of the application at the time of deployment. The deployment process for the module metadata requires a new step to scan the Java annotations data from classes that are packaged in the module. As we are using JAX-WS as a client of WebServices it includes annotation processing. The processing of annotation of JAX-WS requires reading of wsdl files to generate update clients for each deployments. In this process of reading wsdl it was facing problem as its located in WEB-INF folder initially. I just change the location of wsdl and its working fine now.