0

I have a maven generated war file. When I try and deploy the war file, I am getting the following error in catalina.out:

SEVERE: Exception fixing docBase: {0} 
java.io.FileNotFoundException: /usr/share/tomcat6/webapps/ROOT/META-INF/MANIFEST.MF (No such file or directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:457)
    at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:173)
    at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:882)
    at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:1017)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:279)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.StandardContext.init(StandardContext.java:5280)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4086)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:881)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:734)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:497)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1199)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

What is this MANIFEST.mf file and why do I need it suddently? I have deployed probably 20 Tomcat applications that work fine without this error occurring and certainly no manifest file.

thatidiotguy
  • 8,701
  • 13
  • 60
  • 105

1 Answers1

3

Check permissions in that directory; I suspect Tomcat can't see META-INF and/or the manifest file.

raffian
  • 31,267
  • 26
  • 103
  • 174
  • Well there is no manifest file. There is nothing in the META-INF directory at all. And arent't the permissions set by Maven when I run the package routine. – thatidiotguy Sep 10 '13 at 16:03
  • I was referring to standard nix permission. Tomcat runs under some user account; that account has to see `META-INF`. – raffian Sep 10 '13 at 16:08
  • Well the war is not being deployed so there is no directory. In webapps there is just `ROOT.war` – thatidiotguy Sep 10 '13 at 16:10
  • 1
    So this ended up being the issue even though the directory was not being properly deployed. It was in fact missing write permissions on the webapps folder not allowing it to deploy the files correctly. – thatidiotguy Sep 10 '13 at 18:53
  • I never suppress my first instinct!..glad it worked out for ya! – raffian Sep 10 '13 at 19:46
  • My permissions are all set to 777 for the directory chain, group and user is set to tomcat, and when I start tomcat I still get java.io.FileNotFoundException: /opt/tomcat/webapps/ROOT.war (No such file or directory).... even though the file is absolutely there! annoying! – Alkanshel Nov 27 '18 at 02:08