wood burning stoves 2.0*
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: 15957
    
  19

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat6 on Ubuntu
 
Similar Threads
Connection Exception
Syntax Error in tomcat-apache.conf!! - URGENT!!
Tomcat startup problems
How to install tomcat5 in Ubuntu 11.04 when it is not in the apt-cache?
Setting Tomcat in Ubuntu 11.10