You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peiran Song <pe...@cs.uoregon.edu> on 2006/03/03 21:51:29 UTC

jsvc error on Tomcat start

Hi All,

I have Tomcat 5.5.15 installed on a UNIX machine. Installed jsvc, 
customized the Tomcat5.sh start/stop script and symlinked 
/etc/init.d/tomcat to that script.

When I tried to start up the Tomcat by:

                  /etc/init.d/tomcat start
Got:

03/03/2006 11:58:21 13126 jsvc error: No class specified
03/03/2006 11:58:21 13126 jsvc error: Cannot parse command line arguments
/etc/init.d/tomcat: -Djava.io.tmpdir=/tmp: not found

Any ideas on what went wrong?
Thank you very much for any help!

Peiran Song

p.s.   Here is the tomcat script content:
JAVA_HOME=/private/apps/java5.0
CATALINA_HOME=/private/apps/tomcat-5.5.15
DAEMON_HOME=$CATALINA_HOME/bin
TOMCAT_USER=zfishweb

# for multi instances adapt those lines.
TMP_DIR=/tmp
PID_FILE=/var/run/jsvc.pid
#CATALINA_BASE=/home/tomcat5/tomcat5/jakarta-tomcat-5/build

#CATALINA_OPTS="-Djava.library.path=/home/jfclere/jakarta-tomcat-connectors/jni/native/.libs"
CATALINA_OPTS="-Xms512M -Xmx512M"
CLASSPATH=\
$JAVA_HOME/lib/tools.jar:\
$CATALINA_HOME/bin/commons-daemon.jar:\
$CATALINA_HOME/bin/bootstrap.jar

case "$1" in
  start)
    #
    # Start Tomcat
    #
    $DAEMON_HOME/jsvc \
    -user $TOMCAT_USER \
    -home $JAVA_HOME \
    -Dcatalina.home=$CATALINA_HOME \
    #-Dcatalina.base=$CATALINA_BASE \
    -Djava.io.tmpdir=$TMP_DIR \
    -wait 10 \
    -pidfile $PID_FILE \
    -outfile $CATALINA_HOME/logs/catalina.out \
    -errfile '&1' \
    $CATALINA_OPTS \
    -cp $CLASSPATH \
    org.apache.catalina.startup.Bootstrap
    #
    # To get a verbose JVM
    #-verbose \
    # To get a debug of jsvc.
    #-debug \
    exit $?
    ;;

  stop)
    #
    # Stop Tomcat
    #
    $DAEMON_HOME/jsvc \
    -stop \
    -pidfile $PID_FILE \
    org.apache.catalina.startup.Bootstrap
    exit $?
    ;;

  *)
    echo "Usage tomcat.sh start/stop"
    exit 1;;
esac


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsvc error on Tomcat start

Posted by Peiran Song <pe...@cs.uoregon.edu>.
>> case "$1" in
>>   start)
>>     #
>>     # Start Tomcat
>>     #
>>     $DAEMON_HOME/jsvc \
>>     -user $TOMCAT_USER \
>>     -home $JAVA_HOME \
>>     -Dcatalina.home=$CATALINA_HOME \
>>     #-Dcatalina.base=$CATALINA_BASE \
>>     
>       ^
> Remove the comment ("#") or remove the entire line.
>   

That is it! Thank you!

Peiran


> Regards
>   mks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsvc error on Tomcat start

Posted by Markus Schönhaber <ma...@schoenhaber.de>.
Peiran Song wrote:
> When I tried to start up the Tomcat by:
>
>                   /etc/init.d/tomcat start
> Got:
>
> 03/03/2006 11:58:21 13126 jsvc error: No class specified
> 03/03/2006 11:58:21 13126 jsvc error: Cannot parse command line arguments
> /etc/init.d/tomcat: -Djava.io.tmpdir=/tmp: not found
[...]
> case "$1" in
>   start)
>     #
>     # Start Tomcat
>     #
>     $DAEMON_HOME/jsvc \
>     -user $TOMCAT_USER \
>     -home $JAVA_HOME \
>     -Dcatalina.home=$CATALINA_HOME \
>     #-Dcatalina.base=$CATALINA_BASE \
      ^
Remove the comment ("#") or remove the entire line.

Regards
  mks

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org