Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7420365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:13:32+00:00 2026-05-29T08:13:32+00:00

I am trying to start/stop tomcat from Ant. Here is my relevant portion of

  • 0

I am trying to start/stop tomcat from Ant. Here is my relevant portion of the xml file for stopping :

<target name="stop" depends="readProperties" >
    <exec executable="/home/local/WorkEnvironment/apache-tomcat-7.0.14/bin/">
        <arg value="shutdown.sh"/>
    </exec>
</target>

This gives the following exception :

/home/local/workspace/Eclipse/Main/tomcat.xml:26: Execute failed: java.io.IOException: java.io.IOException: Permission denied
   at java.lang.PosixProcess.<init>(libgcj.so.11)
   at java.lang.Runtime.execInternal(libgcj.so.11)
   at java.lang.Runtime.exec(libgcj.so.11)
   at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
   at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
   at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
   at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
   at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
   at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   at java.lang.reflect.Method.invoke(libgcj.so.11)
   at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   at org.apache.tools.ant.Task.perform(Task.java:348)
   at org.apache.tools.ant.Target.execute(Target.java:390)
   at org.apache.tools.ant.Target.performTasks(Target.java:411)
   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
   at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
   at org.apache.tools.ant.Main.runBuild(Main.java:809)
   at org.apache.tools.ant.Main.startAnt(Main.java:217)
   at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
   at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: Permission denied
   at java.lang.PosixProcess.nativeSpawn(libgcj.so.11)
   at java.lang.PosixProcess.spawn(libgcj.so.11)
   at java.lang.PosixProcess$ProcessManager.run(libgcj.so.11)

Seeing this, I tried the following :

<target name="stop" depends="readProperties" >
    <echo message="${tomcat.path.home}"/>

    <java jar="${tomcat.path.home}/bin/bootstrap.jar" fork="true">
           <jvmarg value="-Dcatalina.home=${tomcat.path.home}"/>

            <arg line="stop"></arg>
    </java>
</target>

This tells me that :

stop:
     [echo] /home/local/WorkEnvironment/apache-tomcat-7.0.14
     [java] Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.juli.logging.LogFactory
     [java]    at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:60)
     [java]    at java.lang.Class.initializeClass(libgcj.so.11)
     [java] Java Result: 1

I checked for tomcat-juli.jar and its present in tomcat_home/bin and also in tomcat_home/lib. It also has the class which ant says is missing. What is going wrong ? I saw that sometimes the Manifest.MF file can mislead, but, I could not make out what exactly could be wrong with that file 🙁 .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:13:33+00:00Added an answer on May 29, 2026 at 8:13 am

    Shouldn’t executable include “shutdown.sh”? (not shutdown as an arg, but as part of the executable path).

    Something like:

    <target name="stop" depends="readProperties" >
        <exec executable="/home/local/WorkEnvironment/apache-tomcat-7.0.14/bin/shutdown.sh">
        </exec>
    </target>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to make an init script using start-stop-daemon. I am stuck
I'm trying to write a program that can stop and start services using SilverLight
I am trying to start a service from the command line using net start
I am trying to start and stop a quartz scheduler in a spring singleton
-- Original Post -- I am trying to manage (start/stop) a windows service on
I am trying to figure out how to start and stop a serial interface.
I am trying to figure out how on earth i can start and stop
I am trying to implement start and stop alarm timer in android with a
I'm trying to start/stop Java threads in the following way. public class ThreadTester {
I am trying to develop a windows application to start/stop and monitor status of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.