Error deploying web application archive essentials.war

1,700 views
Skip to first unread message

cyberspetz

unread,
Feb 15, 2017, 11:36:19 AM2/15/17
to Hippo Community
I am following the guide here:

After execution of command:
mvn -Pcargo.run -Drepo.path=storage

site.war and cms.war are deployed fine and I can reach the UI
but the essentials.war are not reachable through http://localhost:8080/essentials/
as the essentials.war file was not deployed.

I assume the problem is somehow related to java.util.zip.ZipException: zip file is empty

[INFO] [talledLocalContainer] 15-Feb-2017 18:19:04.590 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /Users/xxx/git/hippo/myhippoproject/target/tomcat8x/webapps/cms.war has finished in 14,078 ms
[INFO] [talledLocalContainer] 15-Feb-2017 18:19:04.591 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /Users/xxx/git/hippo/myhippoproject/target/tomcat8x/webapps/essentials.war
[INFO] [talledLocalContainer] 15-Feb-2017 18:19:05.370 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
[INFO] [talledLocalContainer]  org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/essentials]]
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
[INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745)
[INFO] [talledLocalContainer] Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@77638d83]
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4969)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5099)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
[INFO] [talledLocalContainer] ... 10 more
[INFO] [talledLocalContainer] Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@71f607e1]
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:135)
[INFO] [talledLocalContainer] at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:706)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
[INFO] [talledLocalContainer] ... 13 more
[INFO] [talledLocalContainer] Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: zip file is empty
[INFO] [talledLocalContainer] at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:113)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
[INFO] [talledLocalContainer] ... 16 more
[INFO] [talledLocalContainer] Caused by: java.util.zip.ZipException: zip file is empty
[INFO] [talledLocalContainer] at java.util.zip.ZipFile.open(Native Method)
[INFO] [talledLocalContainer] at java.util.zip.ZipFile.<init>(ZipFile.java:219)
[INFO] [talledLocalContainer] at java.util.zip.ZipFile.<init>(ZipFile.java:149)
[INFO] [talledLocalContainer] at java.util.jar.JarFile.<init>(JarFile.java:166)
[INFO] [talledLocalContainer] at java.util.jar.JarFile.<init>(JarFile.java:103)
[INFO] [talledLocalContainer] at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:110)
[INFO] [talledLocalContainer] ... 17 more
[INFO] [talledLocalContainer] 
[INFO] [talledLocalContainer] 15-Feb-2017 18:19:05.371 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive /Users/xxx/git/hippo/myhippoproject/target/tomcat8x/webapps/essentials.war
[INFO] [talledLocalContainer]  java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/essentials]]
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
[INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745)
[INFO] [talledLocalContainer] 

See full log attached.




Confidentiality Note:  This e-mail and any attachments are confidential and may be protected by legal privilege. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.
essentials_error.txt

Woonsan Ko

unread,
Feb 15, 2017, 11:41:03 AM2/15/17
to hippo-c...@googlegroups.com
It looks like essentials.war under essentials/target/ folder was not created correctly in your build process (`mvn clean verify`) for some reason.
Could you try to build it again and verify essentials/target/essentials.war? In my 11.1 vanilla project, the war should be up to about 70MB. You can check the size and content with `jar tvf essentials.war'.

Regards,

Woonsan


--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.



--
71 Summer Street, 2nd Floor, Boston, MA 02110
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466

ykisy...@n-ix.com

unread,
Feb 16, 2017, 4:14:13 AM2/16/17
to Hippo Community
Hello Woonsan,

Thank you for the reply,

I've checked and size essentials.war is 68.1 MB (see screenshot attached)

find the result of jar tvf command in attachment ->jar_tvf_essentials_war.txt


I'm using :
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)


I've also extracted the content, see attached "essentials_war_content_removed_lib_and_images.zip" (zipped directory with removed 'lib' and 'images' folders) so you can take a look what is in there.

In addition there is a directory/files essentials_content_tree.txt

To post to this group, send email to hippo-c...@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.



--
71 Summer Street, 2nd Floor, Boston, MA 02110
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466

essentials_content_tree.txt
essentials_war_content_size.txt
jar_tvf_essentials_war.txt

ykisy...@n-ix.com

unread,
Feb 16, 2017, 4:14:13 AM2/16/17
to Hippo Community
Here are the web.xml and classes I'm using.


On Wednesday, February 15, 2017 at 6:41:03 PM UTC+2, woonsan.ko wrote:
To post to this group, send email to hippo-c...@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.



--
71 Summer Street, 2nd Floor, Boston, MA 02110
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466

web.xml
classes.zip

ykisy...@n-ix.com

unread,
Feb 16, 2017, 7:59:21 AM2/16/17
to Hippo Community, ykisy...@n-ix.com
I've tried the same project on Windows machine and it started well! 

Ha it works now on my mac as well.

Pure magic. What I did was cleaning maven cache...

Jasper Floor

unread,
Feb 16, 2017, 8:06:01 AM2/16/17
to Hippo Community
Thanks for letting us know. As Woonsan said, something went wrong in the build process and that it resolves with clearing your maven cache confirms this.

mvg,
Jasper

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-community@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.

ykisy...@n-ix.com

unread,
Feb 16, 2017, 10:04:48 AM2/16/17
to Hippo Community
Well I figured out the exact problem:

The app configuration requires "sudo" permission to build everything properly, if I'm not sudoer (root) I'll still get wars build successfully but they will fail at deployment to tomcat
.
I assume this is all because of cargo plugin managing deployments and inner tomcat that is used to run wars. 

The message is not informative in logs and says "zip is empty" in reality it's permission issue.

So I think when separating the build process and deploying to external tomcat, there should be no issues as they all will run under 'proper' users and proper permissions.

But in general I'm wondering if there is a person who was able to run a demo project with simple user permissions. Otherwise it means that basic project is only for Windows users.

Thanks.
To post to this group, send email to hippo-c...@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.

Jasper Floor

unread,
Feb 16, 2017, 10:09:14 AM2/16/17
to Hippo Community
I run Linux Mint and I have never had to do anything special for permissions. You certainly don't/shouldn't need root access. There are many Mac developers at Hippo so I doubt it is a Mac.

mvg,
Jasper

To post to this group, send email to hippo-community@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.

ykisy...@n-ix.com

unread,
Feb 16, 2017, 4:31:14 PM2/16/17
to Hippo Community
OK. Finally.

You're right, it was my user maven settings.

I've compared 2 projects. One built using root user, another one using "%simple_user%"

It appeared that maven was using scala-library-2.10.0.jar that was size of zero in maven cache (.m2) for my particular user. For the root new set of libs were used so there was no problem. 

So my recommendation would be to clean /.m2/repository cache in case of similar errors. 

Thanks Jasper.

Regards,
Yaroslav
Reply all
Reply to author
Forward
0 new messages