Bootstrap FreeKB - Tomcat - Resolve "Error opening zip file or JAR manifest missing"
Tomcat - Resolve "Error opening zip file or JAR manifest missing"

Updated:   |  Tomcat articles

Let's say the following is being returned when attempting to start one of your Tomcat application servers (JVMs).

Error opening zip file or JAR manifest missing : /opt/tomcat/jars/foo.jar

 

This typically occurs when you have a zip or jar file in the setenv.sh file being used by the Tomcat application server, such as /opt/tomcat/instances/appserver1/bin/setenv.sh and the zip or jar file is not wrapped in double quotes.

-javaagent: /opt/tomcat/jars/foo.jar

 

Sometimes, all you have to do is to wrap the zip or jar file in double quotes.

"-javaagent: /opt/tomcat/jars/foo.jar"

 

This can also occur when the user running Tomcat does not have permission to the zip or jar file. For example, if Tomcat is being run by "john.doe" and the zip or jar file is owned by "jane.doe", this can cause this issue to occur, including the parent directories except for the first directory which will be owned by root (/opt in this example).

drwxr-xr-w 1 root     root     4096    Jan 1  2022 /opt
drwxr-xr-w 1 jane.doe jane.doe 4096    Jan 1  2022 /opt/tomcat
drwxr-xr-w 1 jane.doe jane.doe 4096    Jan 1  2022 /opt/tomcat/jars
-rw-rw-r-- 1 jane.doe jane.doe 1234567 Jan 1  2022 /opt/tomcat/jars/foo.jar

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 3345d5 in the box below so that we can be sure you are a human.