ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avi Zohari <Avi.Zoh...@Sun.COM>
Subject java.lang.IllegalThreadStateException thrown when terminating several proccesses started via exec task.
Date Tue, 19 Sep 2006 12:11:02 GMT
Hello All.

I found lately that when running several proccesses of a certain 
executable via ant task *exec*, and then closing them all rapidly, an 
IllegalThreadStateException is being thrown.
When running the same amount of proccesses of  the same executable via a 
shell prompt, and rapidly closing them all, no exception is being 
thrown, hence the exception doesn't have anything to do with the 
executables themselves.

I saw some similar problems in the bug database, regarding null pointer 
exceptions, and a different stack trace of an 
IllegalThreadStateException, none of which have a work arround or 
solution so far.
Has any one run into such an error?

Thanks.
Avi Z.

Here are some details:
OS: Windows XP
Ant version: 1.6.5
Java version: 1.5.0_08

The full exception stack trace:

java.lang.IllegalThreadStateException
        at org.apache.tools.ant.Task.perform(Task.java:373)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at 
org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:234)
        at 
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:287)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)
Caused by: java.lang.IllegalThreadStateException
        at java.lang.ThreadGroup.add(ThreadGroup.java:856)
        at java.lang.Thread.start(Thread.java:573)
        at 
org.apache.tools.ant.taskdefs.ProcessDestroyer.removeShutdownHook(ProcessDestroyer.java:145)
        at 
org.apache.tools.ant.taskdefs.ProcessDestroyer.remove(ProcessDestroyer.java:198)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:490)
        at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:576)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:617)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:452)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        ... 9 more
--- Nested Exception ---
java.lang.IllegalThreadStateException
        at java.lang.ThreadGroup.add(ThreadGroup.java:856)
        at java.lang.Thread.start(Thread.java:573)
        at 
org.apache.tools.ant.taskdefs.ProcessDestroyer.removeShutdownHook(ProcessDestroyer.java:145)
        at 
org.apache.tools.ant.taskdefs.ProcessDestroyer.remove(ProcessDestroyer.java:198)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:490)
        at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:576)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:617)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:452)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at 
org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:234)
        at 
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:287)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message