Product:
Search Type:

The warning appears during Tomcat startup: "you have specified the -mindepth option after a non-option argument -type...".

Article ID: 2223 
Last Review: Oct,04 2007
APPLIES TO:
  • Plesk for Linux/Unix

SYMPTOMS

When I stat Tomcat from the command line, the waring appears:

# /etc/init.d/tomcat5  start
Starting tomcat5: find: warning: you have specified the -mindepth option
after a non-option argument -type, but options are not positional (-mindepth affects te sts specified before it as well as those specified after it).  Please specify op tions before other arguments.
...
Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JAVA_HOME:       /usr/lib/jvm/java

CAUSE

This is a really only a warning because tomcat starts fine itself. The reason of this message is improper 'find' command usage in the Tomcat start script.

RESOLUTION

You can get rid of this waring by correcting '/usr/share/tomcat5/bin/relink' script. Move '-type d' option to the end of 'find' command, like:


...
for webapp in $(find /var/lib/tomcat5/webapps -mindepth 1 -maxdepth 2 -type d) ; do
    [ -d "$webapp/WEB-INF/lib" ] && rebuild-jar-repository $webapp/WEB-INF/lib
done
...

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields