Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-ant-dev] AntSecurityManager


This is bug...it appears that the AntSecurityManager was not properly removed upon the completion of a Ant build.
Since Ant runs in the same VM as Eclipse, we set the Ant security manager at the start of the build and then restore the original security manager (or as is usually the case set the security manager back to null) when the build completes.

Can you please open a bug report with as many details as you can provide (including build files if possible)

Thanks for helping us identify the problem
Darins



"Julien Ruaux" <jruaux@xxxxxxxx>
Sent by: platform-ant-dev-admin@xxxxxxxxxxx

01/23/03 03:29 AM
Please respond to platform-ant-dev

       
        To:        <platform-ant-dev@xxxxxxxxxxx>
        cc:        
        Subject:        RE: [platform-ant-dev] AntSecurityManager



Here is the stack trace :


Thread [main] (Suspended (exception
org.eclipse.ant.core.AntSecurityException))
org.eclipse.ant.internal.core.ant.AntSecurityManager.checkExit(int)
line: 40
java.lang.Runtime.exit(int) line: 86
java.lang.System.exit(int) line: 696
org.eclipse.core.launcher.Main.main(java.lang.String[]) line: 551


Julien
-----Original Message-----
From: platform-ant-dev-admin@xxxxxxxxxxx
[mailto:platform-ant-dev-admin@xxxxxxxxxxx] On Behalf Of Darin Swanson
Sent: Wednesday, January 22, 2003 7:05 PM
To: platform-ant-dev@xxxxxxxxxxx
Subject: RE: [platform-ant-dev] AntSecurityManager



In debug mode you can copy the stack trace...context menu on the
suspended thread, Copy Stack.
I want to see who is calling the AntSecurityManager#checkExit()

Darins


"Julien Ruaux" <jruaux@xxxxxxxx>
Sent by: platform-ant-dev-admin@xxxxxxxxxxx
01/22/03 11:41 AM
Please respond to platform-ant-dev
       
       To:        <platform-ant-dev@xxxxxxxxxxx>
       cc:        
       Subject:        RE: [platform-ant-dev] AntSecurityManager




The stack trace isn't really helpful :
Exception in thread "main"

I've seen what exception is thrown in debug mode with halt on uncaught
exceptions. AntSecurityManager.checkExit() does : throw new
AntSecurityException()

Julien


-----Original Message-----
From: platform-ant-dev-admin@xxxxxxxxxxx
[mailto:platform-ant-dev-admin@xxxxxxxxxxx] On Behalf Of Darin Swanson
Sent: Wednesday, January 22, 2003 6:29 PM
To: platform-ant-dev@xxxxxxxxxxx
Subject: RE: [platform-ant-dev] AntSecurityManager



So the exception is being thrown but isn't it caught and handled (by
being absorbed)?
Can you post the stacktrace?

Darins


"Julien Ruaux" <jruaux@xxxxxxxx>
Sent by: platform-ant-dev-admin@xxxxxxxxxxx
01/22/03 11:12 AM
Please respond to platform-ant-dev
     

       To:        <platform-ant-dev@xxxxxxxxxxx>
      cc:        
      Subject:        RE: [platform-ant-dev] AntSecurityManager




Darin,

thanks for the fast answer.
Actually all my builds launch a separate VM since the <java> task fork
argument is set to true.
The exception occurs although Tomcat, launched by the first build, has
already been shutdown by the second build. I can see that the Tomcat VM
has terminated with Windows task manager. Then I close the Eclipse
self-hosting instance, and I get the exception.
Now do you see a workaround to this problem, and is this a bug ?

Julien
-----Original Message-----
From: platform-ant-dev-admin@xxxxxxxxxxx
[mailto:platform-ant-dev-admin@xxxxxxxxxxx] On Behalf Of Darin Swanson
Sent: Wednesday, January 22, 2003 5:16 PM
To: platform-ant-dev@xxxxxxxxxxx
Subject: Re: [platform-ant-dev] AntSecurityManager


The AntSecurityManager exists so that it is not possible for an Ant
build within Eclipse to cause the Eclipse VM to exit since currently all
Ant builds occur within the same VM that launched Eclipse.

Can you log a bug report against platform ant...it looks like we are
effectively not allowing any other Java process to exit / be shutdown
(in some cases) as well...but I will have to investigate. Build files
that reproduce the problem (simpler the better :-) ) would be greatly
appreciated.

My current workaround for you: have your plugin, on Eclipse shutdown,
execute the stop Tomcat build file.

Thanks
Darins


"Julien Ruaux" <jruaux@xxxxxxxx>
Sent by: platform-ant-dev-admin@xxxxxxxxxxx
01/22/03 10:01 AM
Please respond to platform-ant-dev        
     To:        <platform-ant-dev@xxxxxxxxxxx>
     cc:        
     Subject:        [platform-ant-dev] AntSecurityManager




Hi,

I am using AntRunner in a plugin I am writing.

The Ant scripts it's running are mainly :
- a script to start Tomcat 4.0 with <java jvm='javaw'
classname="org.apache.catalina.startup.Bootstrap"... />
- another one to stop Tomcat, which puts an end to the previous script's
java task.

An exception occurs when closing down Eclipse or the Eclipse instance in
self-hosting.
This is thrown by the checkExit(int) method of AntSecurityManager.

Thanks for your help,

Julein

_______________________________________________
platform-ant-dev mailing list
platform-ant-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ant-dev

_______________________________________________
platform-ant-dev mailing list
platform-ant-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ant-dev



Back to the top