File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat6 on Ubuntu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat6 on Ubuntu" Watch "Tomcat6 on Ubuntu" New topic
Author

Tomcat6 on Ubuntu

Pavan bhagavatula
Greenhorn

Joined: Oct 22, 2011
Posts: 3
Need help from Tomcat and Ubuntu user group..

I have the following script to start / stop / restart my tomcat server on ubuntu OS. Start is working fine but when i try to stop i am getting syntax syntax error below..

export JAVA_HOME=/usr/lib/jvm/jdk1.7.0

case $1 in
start)
sh /usr/local/tomcat/bin/startup.sh
;;
stop)
sh /usr/local/tomcat/bin/shutdown.sh
;;
restart)
sh /usr/local/tomcat/bin/shutdown.sh
sh /usr/local/tomcat/bin/startup.sh
;;
esac
exit 0

Here is the error..
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/jdk1.7.0
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar
/usr/lib/jvm/jdk1.7.0/bin/java: 1: Syntax error: "(" unexpected
pavan@pavan-Vostro-220-Series:/etc/init.d$ ^C


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

Best I can figure out is that maybe your shutdown.sh script has been damaged.

Try this shutdown command instead and see what happens:

sh /usr/local/tomcat/bin/catalina.sh stop

Customer surveys are for companies who didn't pay proper attention to begin with.
 
jQuery in Action, 2nd edition
 
subject: Tomcat6 on Ubuntu