War file redeployment causes issues in Openshift

Solution Verified - Updated -

Issue

  • Sometimes when I redeploy a war file in Openshift on Linux it process successfully and when I access the URL everything works fine but must of the time when I try to redeploy the same war file after performing some updates on my codes, it doesn't deploy successfully anymore. Even though I get successful message after the "git push" but when I access the URL nothing loads. I have restarted my Openshift platform several time and it still doesn't work. Sometimes when I rename EXACTLY the same war file it works fine and URL loads successfully but sometimes it doesn't.

  • Below error is seen in the logs :

ct 07, 2015 5:56:31 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error in dependencyCheck
java.io.IOException: Jar: mysql-connector-java-5.1.36-bin.jar
        at org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:205)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
        at java.util.zip.ZipFile.read(Native Method)
        at java.util.zip.ZipFile.access$1400(ZipFile.java:56)
        at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:679)
        at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:415)
        at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
        at java.io.FilterInputStream.read(FilterInputStream.java:133)
        at java.io.PushbackInputStream.read(PushbackInputStream.java:186)
        at java.util.zip.ZipInputStream.readFully(ZipInputStream.java:424)
        at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:277)
        at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:121)
        at java.util.jar.JarInputStream.<init>(JarInputStream.java:83)
        at java.util.jar.JarInputStream.<init>(JarInputStream.java:62)
        at org.apache.catalina.util.ExtensionValidator.getManifest(ExtensionValidator.java:393)
        at org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:194)
        ... 12 more
Oct 07, 2015 5:56:31 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Oct 07, 2015 5:56:31 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/RushgreenHospital] startup failed due to previous errors
Oct 07, 2015 5:56:31 PM org.apache.catalina.deploy.NamingResources cleanUp
WARNING: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/RushgreenHospital]] so no cleanup was performed for that container
javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [comp].
        at org.apache.naming.NamingContext.lookup(NamingContext.java:819)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
        at org.apache.catalina.deploy.NamingResources.cleanUp(NamingResources.java:986)
        at org.apache.catalina.deploy.NamingResources.stopInternal(NamingResources.java:968)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5676)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Oct 07, 2015 5:56:31 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/55f2b94889f5cfdbec0001ec/app-root/runtime/dependencies/jbossews/webapps/RushgreenHospital.war has finished in 697 ms
Oct 07, 2015 5:56:31 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.10.197.129-8080"

Environment

  • Openshift Online

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In