Jan
Jan

Reputation: 1777

AntSecurityException when opening ant-file in eclipse

one in a while eclipse refuses to open antfiles. The error log tells me that an "AntSecurityException" is the cause. The javadoc for org.eclipse.ant.core.AntSecurityException tells me that the exception is thrown when an ant task wants to stop the jvm. But just opening an ant build should not start any targets or tasks. The only solution is to restart eclipse.

Does someone know how to stop this rather irritating behavior of eclipse.

Regards, Jan

Upvotes: 16

Views: 7664

Answers (5)

user1335968
user1335968

Reputation: 1

Close eclipse , go to workspace, delete the .metadata, start the eclipse, only one drawback you have to do all the manual setting again

Upvotes: 0

Andreas Covidiot
Andreas Covidiot

Reputation: 4765

I have this problem very often.

Now I saw a setting Window-> Preferences-> Ant-> Editor-> Problems-> Security Problems. I set it to Ignore and 'll see if it helps. :-)

Upvotes: 0

user3139361
user3139361

Reputation: 21

Windows -> Preferences -> Ant -> Show error dialog when ant fails

Upvotes: 2

centic
centic

Reputation: 15882

For me disabling Folding did not solve the problem. I dig deeper and found Bug 143416 in Eclipse.

I could get rid of this by removing the xercesImpl.jar and xml-api.jar from the Ant installation that I used, not sure if you are facing the exact same problem or if there are multiple things that cause the exception to appear. It seems the version of xerces/xml-apis in my Ant (v. 1.7.1) interferes with the classes in Eclipse/JDK itself.

Upvotes: 4

Ross
Ross

Reputation: 3008

I have never come across this exception myself. Just out of interest what version of Eclipse are you using?

I did find a solution on the web regarding this though and it is in the folding option of the Ant editor. Try disabling the folding option for Ant editor by going: Windows -> Preferences -> Ant -> Editor -> Folding tab. Uncheck 'Enable folding'

Upvotes: 10

Related Questions