← Back to team overview

dhis2-users team mailing list archive

Re: [Dhis2-devs] WAR file cannot deploy in tomcat 8

 

Are you using this command to download your war file; where 2.23 is the
version of the war file you want to down load. Also, you need to delete the
previous dhis folder that was created by the previous extraction inside
webapps folder.

wget https://www.dhis2.org/download/releases/2.23/dhis.war


On Mar 2, 2017 7:20 AM, "Hannan Khan" <hannank@xxxxxxxxx> wrote:

I am using linux 16.04 LTS server.



On Thu, Mar 2, 2017 at 1:18 PM, gerald thomas <gerald17006@xxxxxxxxx> wrote:

>  Hannan
> What OS are you using? Because these issues about war files normally
> happens on Windows OS. Please try to download war file from a different PC
> without a download application and a stable internet connection.
>
> On Mar 2, 2017 7:07 AM, "Hannan Khan" <hannank@xxxxxxxxx> wrote:
>
>> Thanks Bob and Sovello
>>
>> I download twice but having same error.
>>
>> Trying again.
>>
>> Regards
>>
>> Hannan
>>
>> On Thu, Mar 2, 2017 at 1:04 PM, Sovello Hildebrand Mgani <
>> sovellohpmgani@xxxxxxxxx> wrote:
>>
>>> Hi Hannan,
>>> From the log I think this is the message you need to start
>>> troubleshooting from:
>>> ...
>>> Caused by: java.lang.IllegalStateException: java.util.zip.ZipException:*
>>> invalid entry size (*expected 7165 but got 45246 bytes*) *which means
>>> the war file was corrupt in someway.
>>> You may need to re-download or use another war file that is known to
>>> have worked as Bob has pointed out.
>>>
>>> Cheers
>>>
>>> 2017-03-02 9:09 GMT+03:00 Bob Jolliffe <bobjolliffe@xxxxxxxxx>:
>>>
>>>> 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.j
>>>>> ava: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(Context
>>>>> Config.java:619)
>>>>> at org.apache.catalina.startup.ContextConfig.beforeStart(Contex
>>>>> tConfig.java:752)
>>>>> at org.apache.catalina.startup.ContextConfig.lifecycleEvent(Con
>>>>> textConfig.java:308)
>>>>> at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
>>>>> (LifecycleSupport.java:95)
>>>>> at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(Li
>>>>> fecycleBase.java:90)
>>>>> at org.apache.catalina.util.LifecycleBase.setStateInternal(Life
>>>>> cycleBase.java:394)
>>>>> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.j
>>>>> ava:144)
>>>>> at org.apache.catalina.core.ContainerBase.addChildInternal(Cont
>>>>> ainerBase.java:725)
>>>>> at org.apache.catalina.core.ContainerBase.addChild(ContainerBas
>>>>> e.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(HostCon
>>>>> fig.java:1816)
>>>>> at java.util.concurrent.Executors$RunnableAdapter.call(Executor
>>>>> s.java:511)
>>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>>>> Executor.java:1142)
>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>>>> lExecutor.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].StandardCo
>>>>> ntext[/dhis]]
>>>>> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.j
>>>>> ava:153)
>>>>> at org.apache.catalina.core.ContainerBase.addChildInternal(Cont
>>>>> ainerBase.java:725)
>>>>> at org.apache.catalina.core.ContainerBase.addChild(ContainerBas
>>>>> e.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(HostCon
>>>>> fig.java:1816)
>>>>> at java.util.concurrent.Executors$RunnableAdapter.call(Executor
>>>>> s.java:511)
>>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>>>> Executor.java:1142)
>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>>>> lExecutor.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.getArchiv
>>>>> eEntries(JarWarResourceSet.java:119)
>>>>> at org.apache.catalina.webresources.AbstractArchiveResourceSet.
>>>>> getResource(AbstractArchiveResourceSet.java:256)
>>>>> at org.apache.catalina.webresources.StandardRoot.getResourcesIn
>>>>> ternal(StandardRoot.java:327)
>>>>> at org.apache.catalina.webresources.CachedResource.validateReso
>>>>> urces(CachedResource.java:124)
>>>>> at org.apache.catalina.webresources.Cache.getResources(Cache.java:150)
>>>>> at org.apache.catalina.webresources.StandardRoot.getResources(S
>>>>> tandardRoot.java:315)
>>>>> at org.apache.catalina.webresources.StandardRoot.getClassLoader
>>>>> Resources(StandardRoot.java:231)
>>>>> at org.apache.catalina.util.ExtensionValidator.validateApplicat
>>>>> ion(ExtensionValidator.java:145)
>>>>> at org.apache.catalina.core.StandardContext.startInternal(Stand
>>>>> ardContext.java:5111)
>>>>> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.j
>>>>> ava: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.getArchiv
>>>>> eEntries(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].StandardCo
>>>>> ntext[/dhis]]
>>>>> at org.apache.catalina.core.ContainerBase.addChildInternal(Cont
>>>>> ainerBase.java:729)
>>>>> at org.apache.catalina.core.ContainerBase.addChild(ContainerBas
>>>>> e.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(HostCon
>>>>> fig.java:1816)
>>>>> at java.util.concurrent.Executors$RunnableAdapter.call(Executor
>>>>> s.java:511)
>>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>>>> Executor.java:1142)
>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>>>> lExecutor.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
>>>>>
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> :: Sovello Hildebrand Mgani ::
>>>
>>>
>>>
>>> --If you teach man to fish, you'll feed him a lifetime--
>>>
>>
>>
>>
>> --
>> 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
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>


-- 
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

References