← Back to team overview

dhis2-devs team mailing list archive

Re: WAR file cannot deploy in tomcat 8

 

Looks like a damaged war file (hence the zip exceptions when it tries to
extract).

Please try and download again or try with a known good war file.

On 2 March 2017 at 11:35, Hannan Khan <hannank@xxxxxxxxx> wrote:

> Thanks bob for quick response.
>
> Java:
> java version "1.8.0_121"
> Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
>
> And log:
>
> 02-Mar-2017 11:29:07.031 INFO [localhost-startStop-2]
> org.apache.catalina.startup.HostConfig.deployWAR Deploying web
> application archive /opt/tomcat/webapps/dhis.war
> 02-Mar-2017 11:29:07.604 SEVERE [localhost-startStop-2]
> org.apache.catalina.startup.ContextConfig.beforeStart Exception fixing
> docBase for context [/dhis]
>  java.util.zip.ZipException: invalid literal/lengths set
> at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
> at java.io.FilterInputStream.read(FilterInputStream.java:107)
> at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:381)
> at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:165)
> at org.apache.catalina.startup.ContextConfig.fixDocBase(
> ContextConfig.java:619)
> at org.apache.catalina.startup.ContextConfig.beforeStart(
> ContextConfig.java:752)
> at org.apache.catalina.startup.ContextConfig.lifecycleEvent(
> ContextConfig.java:308)
> at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
> LifecycleSupport.java:95)
> at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
> LifecycleBase.java:90)
> at org.apache.catalina.util.LifecycleBase.setStateInternal(
> LifecycleBase.java:394)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:144)
> at org.apache.catalina.core.ContainerBase.addChildInternal(
> ContainerBase.java:725)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
> at org.apache.catalina.startup.HostConfig$DeployWar.run(
> HostConfig.java:1816)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
>
> 02-Mar-2017 11:29:08.147 SEVERE [localhost-startStop-2]
> org.apache.catalina.core.ContainerBase.addChildInternal
> ContainerBase.addChild: start:
>  org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/dhis]]
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
> at org.apache.catalina.core.ContainerBase.addChildInternal(
> ContainerBase.java:725)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
> at org.apache.catalina.startup.HostConfig$DeployWar.run(
> HostConfig.java:1816)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.IllegalStateException: java.util.zip.ZipException:
> invalid entry size (expected 7165 but got 45246 bytes)
> at org.apache.catalina.webresources.JarWarResourceSet.getArchiveEntries(
> JarWarResourceSet.java:119)
> at org.apache.catalina.webresources.AbstractArchiveResourceSet.
> getResource(AbstractArchiveResourceSet.java:256)
> at org.apache.catalina.webresources.StandardRoot.getResourcesInternal(
> StandardRoot.java:327)
> at org.apache.catalina.webresources.CachedResource.validateResources(
> CachedResource.java:124)
> at org.apache.catalina.webresources.Cache.getResources(Cache.java:150)
> at org.apache.catalina.webresources.StandardRoot.
> getResources(StandardRoot.java:315)
> at org.apache.catalina.webresources.StandardRoot.getClassLoaderResources(
> StandardRoot.java:231)
> at org.apache.catalina.util.ExtensionValidator.validateApplication(
> ExtensionValidator.java:145)
> at org.apache.catalina.core.StandardContext.startInternal(
> StandardContext.java:5111)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
> ... 10 more
> Caused by: java.util.zip.ZipException: invalid entry size (expected 7165
> but got 45246 bytes)
> at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:384)
> at java.util.zip.ZipInputStream.read(ZipInputStream.java:196)
> at java.util.jar.JarInputStream.read(JarInputStream.java:207)
> at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:140)
> at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:118)
> at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:142)
> at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:179)
> at org.apache.catalina.webresources.JarWarResourceSet.getArchiveEntries(
> JarWarResourceSet.java:112)
> ... 19 more
>
> 02-Mar-2017 11:29:08.148 SEVERE [localhost-startStop-2]
> org.apache.catalina.startup.HostConfig.deployWAR Error deploying web
> application archive /opt/tomcat/webapps/dhis.war
>  java.lang.IllegalStateException: ContainerBase.addChild: start:
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/dhis]]
> at org.apache.catalina.core.ContainerBase.addChildInternal(
> ContainerBase.java:729)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
> at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
> at org.apache.catalina.startup.HostConfig$DeployWar.run(
> HostConfig.java:1816)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
>
>
>
> On Thu, Mar 2, 2017 at 11:58 AM, Bob Jolliffe <bobjolliffe@xxxxxxxxx>
> wrote:
>
>> Hi Hannan
>>
>> There is not sufficient info in this message to be able to help.  We know
>> from your report that it failed to start.  You need to look earlier in the
>> logfile for why it failed to start.  Also the java version might be helpful.
>>
>> Bob
>>
>> On 2 March 2017 at 11:24, Hannan Khan <hannank@xxxxxxxxx> wrote:
>>
>>> Dear All
>>>
>>> I just update one server to tomcat8 (version 8.0.36) but not able to
>>> deploy war file (dhis2 version 23) the error message is following. I never
>>> have this message before. I need immediate help.
>>>
>>> FAIL - Encountered exception org.apache.catalina.LifecycleException:
>>> Failed to start component [StandardEngine[Catalina].Stan
>>> dardHost[localhost].StandardContext[/dhis]]
>>>
>>> Regards
>>>
>>> Muhammad Abdul Hannan Khan
>>> DHIS2 Country coordinator & Secretary
>>> HISP Bangladesh
>>>
>>> T +880-2- 8816459 <+880%202-8816459>, 8816412 ext 118
>>> F +88 02 8813 875
>>> M+88 01819 239 241
>>> M+88 01534 312 066
>>> E hannank@xxxxxxxxx
>>> S hannan.khan.dhaka
>>> B hannan-tech.blogspot.com
>>> L https://bd.linkedin.com/in/hannankhan
>>>
>>>
>>>
>>
>
>
> --
> Muhammad Abdul Hannan Khan
> DHIS2 Country coordinator & Secretary
> HISP Bangladesh
>
> T +880-2- 8816459 <+880%202-8816459>, 8816412 ext 118
> F +88 02 8813 875
> M+88 01819 239 241
> M+88 01534 312 066
> E hannank@xxxxxxxxx
> S hannan.khan.dhaka
> B hannan-tech.blogspot.com
> L https://bd.linkedin.com/in/hannankhan
>
>
>

Follow ups

References