Community
Participate
Working Groups
When trying to edit a build file (doubleclick on a build file in the package explorer view), sometimes I get an AntSecurityException and the editor can't be opened anymore. The problem can only be fixed by restarting eclipse. This is the exception message: 'Unable to create editor ID org.eclipse.ant.ui.internal.editor.AntEditor: An unexpected exception was thrown.' Here is the stacktrace: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(System.java:698) at org.eclipse.ant.internal.ui.model.AntModel.processAntHome(AntModel.java:475) at org.eclipse.ant.internal.ui.model.AntModel.initializeProject(AntModel.java:366) at org.eclipse.ant.internal.ui.model.AntModel.prepareForFullParse(AntModel.java:341) at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:305) at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:263) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1383) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1393) at org.eclipse.ant.internal.ui.editor.text.AntFoldingStructureProvider.updateFoldingRegions(AntFoldingStructureProvider.java:88) at org.eclipse.ant.internal.ui.editor.AntEditor.projectionEnabled(AntEditor.java:1370) at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:481) at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:529) at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1429) at org.eclipse.ant.internal.ui.editor.AntEditor$StatusLineSourceViewer.doOperation(AntEditor.java:302) at org.eclipse.ant.internal.ui.editor.AntEditor.createPartControl(AntEditor.java:1103) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:214) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2588) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2521) at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2513) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2498) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2493) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2478) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:388) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:350) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:275) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:139) at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:190) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:174) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:267) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:243) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:306) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:651) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:817) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:843) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:815) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1069) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1168) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:249) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:243) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:283) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
Note: this occurs whilst working with eclipse 3.2 RC5
Thank you for the bug report. Can you provide the buildfile or a similar buildfile that is causing the problem? How long has this problem been occurring? Is it new with RC5? What I am most interested in is what you were doing before the problem occurred...are there consistent steps to get into a state to reproduce the problem?
Hi, it seems to me that the problem is new with RC5. Unfortunately the problem just occurs sporadically, so it is not clear reproducable. It seems to be race conditon or somehting like this... It only occurs whilst working with multiple build files. I will try to prepare a setup to reproduce the behaviour.
This happens to me very frequently. My build files include a common one so this may accentuate it. Another symptom is the syntax highlighting not updating related to changes (pasted in comments stay black, newly uncommented tasks still comment color after save, etc.). This will occur before the file open failure noted. Closing eclipse after this causes a fatal exception also. Here's the relevant stacktrace: org.osgi.framework.BundleException: Exception in org.eclipse.update.internal.core.UpdateCore.stop() of bundle org.eclipse.update.core. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:1052) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:396) at org.eclipse.osgi.framework.internal.core.AbstractBundle.stop(AbstractBundle.java:400) at org.eclipse.core.runtime.internal.adaptor.BundleStopper.basicStopBundles(BundleStopper.java:86) at org.eclipse.core.runtime.internal.adaptor.BundleStopper.stopBundles(BundleStopper.java:73) at org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorHook.frameworkStopping(EclipseAdaptorHook.java:156) at org.eclipse.osgi.baseadaptor.BaseAdaptor.frameworkStopping(BaseAdaptor.java:288) at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:529) at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:440) at org.eclipse.osgi.framework.internal.core.OSGi.close(OSGi.java:41) at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:423) <snip> Caused by: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(System.java:654) at org.eclipse.update.internal.core.connection.ConnectionThreadManager.setIfNotDefaultProperty(ConnectionThreadManager.java:147) at org.eclipse.update.internal.core.connection.ConnectionThreadManager.<init>(ConnectionThreadManager.java:140) at org.eclipse.update.internal.core.connection.ConnectionThreadManagerFactory.getConnectionManager(ConnectionThreadManagerFactory.java:26) at org.eclipse.update.internal.core.UpdateCore.stop(UpdateCore.java:278) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$3.run(BundleContextImpl.java:1036) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:1032) ... 19 more
Created attachment 47588 [details] Our included master build file where I see this frequently. Here is a build file that is involved in this. The referenced build files typically just build jars, wars, ears and occasionally generate web services code or xml bindings. These have had no problems from command line or 3.1.x Eclipse. BTW, I am now experiencing problems where immediately after restarting Eclipse I cannot see any targets in the Ant view or the Run as Ant... listing.
Just wanted to let you know that I've just experienced this problem in 3.2 (with the exact same stacktrace as in comment 0). I've already seen this before (but I didn't bother checking bugzilla back then). If my memory serves me right this was even before RC5. I used to work around the problem by opening the buildfile in the text editor and then reopening it in the Ant editor again. But that didn't work this time. I had to restart Eclipse. BTW: The syntax highlighting issues described in comment 4 also sound familiar. Unfortunately I can't reproduce this in a conistent way.
I am still not able to reproduce this problem. Any reports from Eclipse 3.3?
(In reply to comment #7) > I am still not able to reproduce this problem. > Any reports from Eclipse 3.3? I'm getting the same stacktrace on 3.3.0.
(In reply to comment #8) > (In reply to comment #7) > > I am still not able to reproduce this problem. > > Any reports from Eclipse 3.3? > > I'm getting the same stacktrace on 3.3.0. > Well, not exactly. Mine is: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(Unknown Source) at org.eclipse.ant.internal.ui.model.AntModel.processAntHome(AntModel.java:478) at org.eclipse.ant.internal.ui.model.AntModel.initializeProject(AntModel.java:369) at org.eclipse.ant.internal.ui.model.AntModel.prepareForFullParse(AntModel.java:344) at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:307) at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:265) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1386) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1396) at org.eclipse.ant.internal.ui.editor.text.AntFoldingStructureProvider.updateFoldingRegions(AntFoldingStructureProvider.java:88) at org.eclipse.ant.internal.ui.editor.AntEditor.projectionEnabled(AntEditor.java:1210) at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:481) at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:529) at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1419) at org.eclipse.ant.internal.ui.editor.AntEditor$StatusLineSourceViewer.doOperation(AntEditor.java:213) at org.eclipse.ant.internal.ui.editor.AntEditor.createPartControl(AntEditor.java:944) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:426) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:263) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2721) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2633) at org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPage.java:2625) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2577) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2572) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2556) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2547) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:644) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:603) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:285) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:138) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:194) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:175) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:268) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:244) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:316) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$5.open(PackageExplorerPart.java:613) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:820) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:857) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:193) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:818) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1183) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:263) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:257) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:297) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
(In reply to comment #7) > I am still not able to reproduce this problem. > Any reports from Eclipse 3.3? I get this regularly with 3.3. To add another possible factor - I have re-set my ANT_HOME (Prefs > Ant > Runtime > Classpath> Ant Home...) to point to a 1.6.5 install (don't ask!). Not sure if this is relevant, but it seemed like it might be, given the stack trace.
I am also seeing this problem after installing 3.3. I'm using the Ant shipped with eclipse though (1.7.0). I can confirm that I am editing multiple build files when the error occurs. I never had this problem with 3.2 at all.
Got the same AntSecurityException with a very basic XML file. ---------- build.xml: <project name="test" basedir="." default="test"> <target name="test"> <echo message="test"/> </target> </project> --------- Top of StackTrace: !ENTRY org.eclipse.ui 4 0 2007-10-30 08:35:47.875 !MESSAGE Unable to create editor ID org.eclipse.ant.ui.internal.editor.AntEditor: An unexpected exception was thrown. !STACK 0 org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(Unknown Source) at org.eclipse.ant.internal.ui.model.AntModel.processAntHome(AntModel.java:478) at org.eclipse.ant.internal.ui.model.AntModel.initializeProject .... -------- "Basic" Eclipse Configuration Details: *** Date: tisdag, 2007 oktober 30 kl. 10.11.57 GMT+01.00 *** Platform Details: *** System properties: awt.toolkit=sun.awt.windows.WToolkit eclipse.buildId=I20070625-1500 eclipse.commands=-os win32 -ws win32 -arch x86 -showsplash C:\Dev\eclipse-3.3\\plugins\org.eclipse.platform_3.3.0.v20070613\splash.bmp -launcher C:\Dev\eclipse-3.3\eclipse.exe -name Eclipse --launcher.library C:\Dev\eclipse-3.3\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070523\eclipse_1017a.dll -startup C:\Dev\eclipse-3.3\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar -vm C:\Dev\Java\jre1.6.0_03\bin\client\jvm.dll eclipse.ee.install.verify=false eclipse.product=org.eclipse.platform.ide eclipse.startTime=1193681727656 eclipse.vm=C:\Dev\Java\jre1.6.0_03\bin\client\jvm.dll eclipse.vmargs=-Dmagicdraw.use.popup.dialog=true -XX:MaxPermSize=128m -Xms40m -Xmx512m -Dosgi.bundlefile.limit=100 -Djava.class.path=C:\Dev\eclipse-3.3\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar eof=eof file.encoding=Cp1252 file.encoding.pkg=sun.io file.separator=\ java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment java.awt.printerjob=sun.awt.windows.WPrinterJob java.class.path=C:\Dev\eclipse-3.3\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar java.class.version=50.0 java.endorsed.dirs=C:\Dev\Java\jre1.6.0_03\lib\endorsed java.ext.dirs=C:\Dev\Java\jre1.6.0_03\lib\ext;C:\WINDOWS\Sun\Java\lib\ext java.home=C:\Dev\Java\jre1.6.0_03 java.io.tmpdir=C:\DOCUME~1\eckak\LOCALS~1\Temp\ java.library.path=C:\Dev\eclipse-3.3;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Dev\Java\jre1.6.0_03\bin\client;C:\Dev\Java\jre1.6.0_03\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Tools\MySQL\MySQL Server 5.0\bin;C:\Tools;C:\Tools\apache-ant-1.6.5\bin;C:\Tools\Java\jdk1.5.0_12\bin;C:\Tools\cygwin\bin java.runtime.name=Java(TM) SE Runtime Environment java.runtime.version=1.6.0_03-b05 java.specification.name=Java Platform API Specification java.specification.vendor=Sun Microsystems Inc. java.specification.version=1.6 java.vendor=Sun Microsystems Inc. java.vendor.url=http://java.sun.com/ java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi java.version=1.6.0_03 java.vm.info=mixed mode java.vm.name=Java HotSpot(TM) Client VM java.vm.specification.name=Java Virtual Machine Specification java.vm.specification.vendor=Sun Microsystems Inc. java.vm.specification.version=1.0 java.vm.vendor=Sun Microsystems Inc. java.vm.version=1.6.0_03-b05 line.separator= ....
I have the same stack trace as most, so I started digging into the source to figure out what's causing this error. There's a few things that seem wrong here : * AntSecurityException has a javadoc that reads "A security exception that is thrown by the AntSecurityManager if an Ant task in some way attempts to halt or exit the Java Virtual Machine.". However, looking at the places where this is thrown, this is full of lies (teasing, teasing). The comment should probably be changed to reflect it's use more appropriately, which is where any Ant loaded resource violates the security model (which is what the classname says, so maybe just remove the comment). * AntModel (lines 471-482) attempts to modify System.getProperties()! This seems a bit strange, but hey, I don't know how this fancy GUI programming works or why this would be chose, so I defer to the experts. * AntSecurityManager - public void checkPermission(Permission perm) { if (!fAllowSettingSystemProperties && fgPropertyPermission.implies(perm) && fRestrictedThread == Thread.currentThread()) { //attempting to write a system property throw new AntSecurityException(); } if (fSecurityManager != null) { fSecurityManager.checkPermission(perm); } } The AntSecurityManager is correct, we *are* trying to write a system property! My guess from looking at the if statement is that the offending check is the "fRestrictedThread == Thread.currentThread()". Anyway, it looks like the AntModel is specifically trying to write to the System's properties, and the AntSecurityModel specifically prevents this.... in some cases where the Thread ends up being the "wrong" thread. Not sure more about how this *should* work, but I think that's the root of the issue. If anyone knows a workaround for not doing editing in whatever thread was the main thread (by not recycling editors maybe?), I'd love to see it posted.
Ah, yes, also. I'm using Mac OS X, JDK1.5, Eclipse 3.3.1.1 M20071023-1652 .
I see it in 3.4M4 as well.
Note that just after closing Eclipse to restart it (to fix the problem?!) I also have to KILL Eclipse (3.3/Europa) because it does not end properly...
Created attachment 100804 [details] Different AntSecurityExceptions in my .log file I find 2 different Exception stack traces in my .log file: 1. The Root exception is: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(System.java:699) at org.eclipse.update.internal.core.connection.ConnectionThreadManager.setIfNotDefaultProperty(ConnectionThreadManager.java:147) at org.eclipse.update.internal.core.connection.ConnectionThreadManager.<init>(ConnectionThreadManager.java:140) at org.eclipse.update.internal.core.connection.ConnectionThreadManagerFactory.getConnectionManager(ConnectionThreadManagerFactory.java:26) at org.eclipse.update.internal.core.UpdateCore.stop(UpdateCore.java:267) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$3.run(BundleContextImpl.java:1040) at java.security.AccessController.doPrivileged(Native Method) 2. The other exception occurs when parsing the Ant Files: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(System.java:699) at org.eclipse.ant.internal.ui.model.AntModel.processAntHome(AntModel.java:478) at org.eclipse.ant.internal.ui.model.AntModel.initializeProject(AntModel.java:369) at org.eclipse.ant.internal.ui.model.AntModel.prepareForFullParse(AntModel.java:344) at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:307) at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:265) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1386) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1396) at org.eclipse.ant.internal.ui.AntUtil.getTargets(AntUtil.java:286) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:63) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:86)
I forgot, I'm using Eclipse Version: 3.3.2 Build id: M20080221-1800 The AntSecurityException happens most of the time when I try to open a build.xml file as Ant Editor. It seems that this exception is also due to the issue that I cannot drag&drop build files into the Ant View. It simply does not appear in the view (maybe the second exception in the log comes from this action) My main Ant Script imports other build files which have been grouped like this: <?xml version="1.0"?> <project name="prj-build" basedir="." default="build" xmlns:ivy="antlib:org.apache.ivy.ant"> <import file="config/properties.xml" /> <import file="config/macros.xml" /> <import file="config/build-util.xml"/> <import file="config/build-ejb.xml"/> <import file="config/build-web.xml"/> <import file="config/build-ear.xml" /> <import file="config/build-doc.xml" /> <import file="config/build-test.xml" /> <!-- ... --> </project> The issue in Eclipse is that those build-*.xml files are not shown as Ant scripts in the Package Explorer. 1. The other exception is coming from the ConnectionThreadManager class: private void setIfNotDefaultProperty(String key, String value) { String oldValue = System.getProperty(key); if (oldValue==null || oldValue.equals("-1")) //$NON-NLS-1$ 147: System.setProperty(key, value); } 2. The Ant plugin is trying to set the "ant.home" property, but the installed AntSecurityManager is preventing that. private void processAntHome(boolean finished) { AntCorePreferences prefs= AntCorePlugin.getPlugin().getPreferences(); String antHome= prefs.getAntHome(); if (finished) { System.getProperties().remove("ant.home"); //$NON-NLS-1$ System.getProperties().remove("ant.library.dir"); //$NON-NLS-1$ } else { 478: System.setProperty("ant.home", antHome); //$NON-NLS-1$ File antLibDir= new File(antHome, "lib"); //$NON-NLS-1$ System.setProperty("ant.library.dir", antLibDir.getAbsolutePath()); //$NON-NLS-1$ } } public void checkPermission(Permission perm) { if (!fAllowSettingSystemProperties && fgPropertyPermission.implies(perm) && fRestrictedThread == Thread.currentThread()) { //attempting to write a system property 226: throw new AntSecurityException(); } if (fSecurityManager != null) { fSecurityManager.checkPermission(perm); } } For me this looks like an issue with having the wrong SecurityManager installed. The first exception happens in the ConnectionThreadManager class which (not sure) is not Ant related at all. The second exception seems as if at that time the AntSecurityManager should not have been installed. For me it looks like a wrong order. First the property should be set and then the AntSecurityManager should be installed. But I'm not an Eclipse expert (its my first time I looked into the code) so this is all just guessing.
I'm pretty sure the reason for the bug is that eclipse cannot determine the type of the XML file. I have now configured all my build-*.xml in the "Window -> Preferences -> Ant" pane under "Names:" build.xml,build-test.xml,build-report.xml,... And the issue does not appear anymore. I can use the Ant View withoutz any issue. Even the performance issue I experiences is gone.
I'm experiencing the same issue on a file called build.xml. Let me know if providing it will help. I also cannot figure out a clear way of repeating it, other than it frequently happens, and it happens when I'm trying open build.xml. I don't think it matters whether I'm opening it from the Navigator view or from the Open Resource tool. Environment: OS: Windows XP SP2 JVM: 1.6.0_05-b13 (although I have others installed, I believe it uses this one) Eclipse: 3.3.2 (Europa Winter JEE Build) Eclipse Platform 3.3.3 Eclipse Java Development Tools 3.3.2 WST 2.0.2 (XML Core & Eclipse XML Editors, all 2.0.2) Here's my latest complete stack trace: !ENTRY org.eclipse.ui 4 0 2008-07-10 13:43:30.175 !MESSAGE Unable to create editor ID org.eclipse.ant.ui.internal.editor.AntEditor: An unexpected exception was thrown. !STACK 0 org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(Unknown Source) at org.eclipse.ant.internal.ui.model.AntModel.processAntHome(AntModel.java:478) at org.eclipse.ant.internal.ui.model.AntModel.initializeProject(AntModel.java:369) at org.eclipse.ant.internal.ui.model.AntModel.prepareForFullParse(AntModel.java:344) at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:307) at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:265) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1386) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1396) at org.eclipse.ant.internal.ui.editor.text.AntFoldingStructureProvider.updateFoldingRegions(AntFoldingStructureProvider.java:88) at org.eclipse.ant.internal.ui.editor.AntEditor.projectionEnabled(AntEditor.java:1210) at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:481) at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:529) at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1419) at org.eclipse.ant.internal.ui.editor.AntEditor$StatusLineSourceViewer.doOperation(AntEditor.java:213) at org.eclipse.ant.internal.ui.editor.AntEditor.createPartControl(AntEditor.java:944) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:426) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592) at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:299) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:179) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268) at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:400) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256) at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209) at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1604) at org.eclipse.ui.internal.PartStack.add(PartStack.java:499) at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103) at org.eclipse.ui.internal.PartStack.add(PartStack.java:485) at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112) at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63) at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:217) at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:207) at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:774) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:673) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:634) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2737) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2651) at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:2643) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2595) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2590) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2574) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2565) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:644) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:603) at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.execute(OpenResourceHandler.java:124) at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.run(OpenResourceHandler.java:176) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:271) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:475) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:429) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:165) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:470) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:821) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:879) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:568) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:510) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:126) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1141) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:975) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:971) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1285) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3772) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3672) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:291) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1554) at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1753) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4351) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2265) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3291) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173) !ENTRY org.eclipse.update.core 4 0 2008-07-10 13:43:38.364 !MESSAGE !STACK 0 org.osgi.framework.BundleException: Exception in org.eclipse.update.internal.core.UpdateCore.stop() of bundle org.eclipse.update.core. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:1056) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:457) at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:526) at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1148) at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:675) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:291) at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:261) at org.eclipse.osgi.framework.internal.core.SystemBundle.suspend(SystemBundle.java:188) at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:622) at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:525) at org.eclipse.osgi.framework.internal.core.OSGi.close(OSGi.java:41) at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:399) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173) Caused by: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(Unknown Source) at org.eclipse.update.internal.core.connection.ConnectionThreadManager.setIfNotDefaultProperty(ConnectionThreadManager.java:147) at org.eclipse.update.internal.core.connection.ConnectionThreadManager.<init>(ConnectionThreadManager.java:140) at org.eclipse.update.internal.core.connection.ConnectionThreadManagerFactory.getConnectionManager(ConnectionThreadManagerFactory.java:26) at org.eclipse.update.internal.core.UpdateCore.stop(UpdateCore.java:267) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$3.run(BundleContextImpl.java:1040) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:1036) ... 19 more Root exception: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(Unknown Source) at org.eclipse.update.internal.core.connection.ConnectionThreadManager.setIfNotDefaultProperty(ConnectionThreadManager.java:147) at org.eclipse.update.internal.core.connection.ConnectionThreadManager.<init>(ConnectionThreadManager.java:140) at org.eclipse.update.internal.core.connection.ConnectionThreadManagerFactory.getConnectionManager(ConnectionThreadManagerFactory.java:26) at org.eclipse.update.internal.core.UpdateCore.stop(UpdateCore.java:267) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$3.run(BundleContextImpl.java:1040) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:1036) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:457) at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:526) at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1148) at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:675) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:291) at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:261) at org.eclipse.osgi.framework.internal.core.SystemBundle.suspend(SystemBundle.java:188) at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:622) at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:525) at org.eclipse.osgi.framework.internal.core.OSGi.close(OSGi.java:41) at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:399) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173) Please keep me posted if you get any work-arounds or patches.
I haven't had this problem for a while since I starting using the latest release of Eclipse (Ganymede packages which I think is approx 3.4). However I have had some other problems so if you'd like to try I'd recommend that you don't remove your old release until you're sure that everything works (with all your plugins and stuff).
Still the same problem. Happens regularly. It's required to kill the eclipse process on exit. eclipse.buildId=M20090211-1700 java.version=1.5.0_12 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_CH Framework arguments: -showlocation Command-line arguments: -os win32 -ws win32 -arch x86 -showlocation
I just had this problem and it seems like I found at least one of the possible reason for it. At least I can reproduce it 100% with a certain setup: Setup: * ubuntu 8.10 * Eclipse 3.3 (all latest Updates installed) * separate (!) Ant version 1.7.1 in /opt/ant (this is not the one shipped with Eclipse) * added "/opt/ant" to ubuntu's $PATH environment variable * have set up an $ANT_HOME environment variable which points to /opt/ant Now on to the error * start Eclipse * create a simple build.xml (I had a simple target in it, echoeing some text) and save it * Drag that file to the "Ant View" * boom (100% reproducible for me) Possible solutions that *don't* work: * In Eclipse, point "Preferences -> Ant -> Runtime -> Ant Home" to /opt/ant as well * remove my ANT_HOME environment variable Fixed the problem by * removing /opt/ant from my environment's $PATH
Little typo in my former comment regarding the setup: I added "/opt/ant/bin" to ubuntu's $PATH environment variable, not "/opt/ant"
Sorry, but another necessary addition to my former comment: I can *edit* the Ant build file fine, without any error. I only get the AntSecurityException when dragging the build file to the Ant View. I posted my comments here because I thought they might be related. But maybe that's just a different bug....
Still happening in eclipse 3.5. I can't open a build file with the Ant Editor, and the launch configuration in eclipse for a previously launched ant build says it can't find any build targets in the file. Thankfully I can get by using the XML Editor and the Ant view which I prefer when working with ant scripts anyway.
I managed to resolved both my issues by setting the Windows system environment variable ANT_HOME to the location of the org.eclipse.ant plugin in my eclipse installation. Previously ANT_HOME was not set because I didn't think it needed to be. Is ANT_HOME supposed to be set? Is there a reason why it can't just work without it being set? Does anyone else still have these issues even when ANT_HOME is set? (In reply to comment #26) > Still happening in eclipse 3.5. I can't open a build file with the Ant Editor, > and the launch configuration in eclipse for a previously launched ant build > says it can't find any build targets in the file. Thankfully I can get by > using the XML Editor and the Ant view which I prefer when working with ant > scripts anyway. >
Bah, sorry, I meant org.apache.ant, not org.eclipse.ant... (In reply to comment #27)
Using eclipse 3.5 (20090619-0625) with org.apache.ant 1.7.1.v20090120-1145. The problem is happening again even though, contrary to my previous comment, my ANT_HOME environment variable is still set to the location of the ant plugin. Also, I made the mistake of having my build file open with the Ant editor (unusable and displaying the error) when restarting eclipse, so eclipse didn't restart because of the AntSecurityException. Shouldn't that just prevent the editor from opening and not the entire platform from launching? I did launch eclipse manually and it started fine that time, not sure why there's a difference. I reopened my build file with the ant editor and it loaded fine finally. I'll include some of my various AntSecurityException stack traces if they differ from ones previously posted once my Windows Explorer is finished being hung :p
Created attachment 158074 [details] various instances of AntSecurityException
Using eclipse 3.5.2 with org.apache.ant 1.7.1.v20090120-1145 the error still occurs. It seems that the error occurs directly after/during the save-action in AntUtil.getTargets(AntUtil.java:304). scenario: We have an ant buildfile named "common.xml" declaring some build targets: build, all, prepare, post-prepare, pre-compile, compile, post-compile etc. Now we have a specialized buildfile called "build-plugin.xml" which imports "common.xml" and overwrites the targets "post-prepare" and "post-compile". stacktrace: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(Unknown Source) at org.eclipse.ant.internal.ui.model.AntModel.processAntHome(AntModel.java:485) at org.eclipse.ant.internal.ui.model.AntModel.initializeProject(AntModel.java:371) at org.eclipse.ant.internal.ui.model.AntModel.prepareForFullParse(AntModel.java:346) at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:309) at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:267) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1393) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1403) at org.eclipse.ant.internal.ui.AntUtil.getTargets(AntUtil.java:304) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:63) at org.eclipse.ant.internal.ui.views.AntView.handleBuildFileChanged(AntView.java:160) at org.eclipse.ant.internal.ui.views.AntView.handleChangeDelta(AntView.java:674) at org.eclipse.ant.internal.ui.views.AntView.resourceChanged(AntView.java:649) at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285) at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149) at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:313) at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1022) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1809) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118) at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:75) at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:65) at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:456) at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:772) at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:4946) at org.eclipse.ui.texteditor.AbstractTextEditor.doSave(AbstractTextEditor.java:4735) at org.eclipse.ant.internal.ui.editor.AntEditor.doSave(AntEditor.java:1036) at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7067) at org.eclipse.ui.Saveable.doSave(Saveable.java:214) at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:346) at org.eclipse.ui.internal.SaveableHelper$3.run(SaveableHelper.java:193) at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:274) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2579) at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:282) at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:261) at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:204) at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:144) at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1357) at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:3328) at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3341) at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:76) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185) at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:470) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:824) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:880) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:569) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:510) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:125) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1208) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1040) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1036) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1368) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4053) at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:346) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3946) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:342) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4619) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2411) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3501) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
I confirm this report Helios 20100617-1415. This is very annoying. It also affects Ubuntu Linux and MacOSX. My colleagues have the same problem.
This is a major bug: having to restart Eclipse every two minutes is the worst user experience ever (after not starting at all maybe). And four years without a fix? No offense, but... can we at least know if somebody is looking into this issue seriously?
(In reply to comment #33) > This is a major bug: having to restart Eclipse every two minutes is the worst > user experience ever (after not starting at all maybe). > And four years without a fix? > No offense, but... can we at least know if somebody is looking into this issue > seriously? The reality is that no one has been looking into this one... Looking at the stack traces from comment#30, it looks like there problem stems from two threads attempting a reconcile at once. The ant editor is performing a reconcile, which parses an Ant build file at the same time that the Ant View receives a resource delta and also parses an Ant build file in a different thread. This could instantiate two AntSecurityManagers at the same time, causing the problem.
However, I can't see where org.eclipse.ant.internal.ui.model.AntModel.reconcile() is called outside the UI thread...
*** Bug 273391 has been marked as a duplicate of this bug. ***
*** Bug 318198 has been marked as a duplicate of this bug. ***
Hi, not sure it is the same problem. Using eclipse 3.4.2 + apache-ant1.7.0. When opening an ant file (Ant View), I get another exception and it is impossible to open any ant file anymore. It is not the same error 'AntSecurity' as mentioned by Gerd but symptoms are the same : I need to close and reopen eclipse, to be able viewing a ant file again in the ant view. Note that I added ant-contrib-1.0.b3 in the ANT_HOME path of eclipse Workflow to reproduce the bug (100% reproducible for me): 1. open eclipse 2. open an ant script 3. close all ant scripts that are open 4. reopen a script 5. exception generated Could not open the editor: org.apache.xerces.parsers.XIncludeAwareParserConfiguration java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source) at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source) at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source) at org.apache.tools.ant.util.JAXPUtils.newSAXParser(JAXPUtils.java:215) at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:172) at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:185) at org.apache.tools.ant.helper.ProjectHelper2.parseUnknownElement(ProjectHelper2.java:86) at org.apache.tools.ant.taskdefs.Antlib.createAntlib(Antlib.java:75) at org.apache.tools.ant.taskdefs.Definer.loadAntlib(Definer.java:429) at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:281) at org.apache.tools.ant.ComponentHelper.checkNamespace(ComponentHelper.java:802) at org.apache.tools.ant.ComponentHelper.getDefinition(ComponentHelper.java:259) at org.apache.tools.ant.ComponentHelper.getComponentClass(ComponentHelper.java:249) at org.apache.tools.ant.IntrospectionHelper.createAddTypeCreator(IntrospectionHelper.java:1366) at org.apache.tools.ant.IntrospectionHelper.getNestedCreator(IntrospectionHelper.java:494) at org.apache.tools.ant.IntrospectionHelper.getElementCreator(IntrospectionHelper.java:593) at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:543) at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:343) at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:566) at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:343) at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:566) at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:343) at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:198) at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:160) at org.apache.tools.ant.Project.resolveIdReference(Project.java:1890) at org.apache.tools.ant.Project.getReference(Project.java:1951) at org.eclipse.ant.internal.ui.model.AntTaskNode.configure(AntTaskNode.java:114) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:504) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.resolveBuildfile(AntModel.java:506) at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:329) at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:265) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1386) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1396) at org.eclipse.ant.internal.ui.editor.text.AntFoldingStructureProvider.updateFoldingRegions(AntFoldingStructureProvider.java:88) at org.eclipse.ant.internal.ui.editor.AntEditor.projectionEnabled(AntEditor.java:1243) at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:480) at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:528) at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1413) at org.eclipse.ant.internal.ui.editor.AntEditor$StatusLineSourceViewer.doOperation(AntEditor.java:215) at org.eclipse.ant.internal.ui.editor.AntEditor.createPartControl(AntEditor.java:971) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594) at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:306) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270) at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256) at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209) at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1608) at org.eclipse.ui.internal.PartStack.add(PartStack.java:499) at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103) at org.eclipse.ui.internal.PartStack.add(PartStack.java:485) at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112) at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63) at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:217) at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:207) at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:779) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:678) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:639) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2817) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2729) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2721) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2673) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2652) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2643) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:646) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:605) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:318) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:160) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:207) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:363) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$5.open(PackageExplorerPart.java:603) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:820) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:880) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:818) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1183) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:263) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:257) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:297) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
I'm experiencing the same prolem right now AntSecurityException Eclipse Java EE IDE for Web Developers. Version: Helios Service Release 2 Build id: 20110218-0911 As a partial remedy turn off folding option of the ant editor Window->Preferences->Ant->Editor->Folding->"Enable folding when opening new editor". as described in here http://jakub.lunisolar.eu/index.php?option=com_content&view=article&catid=2:blog&id=27:antsecurityexception-in-eclipse&Itemid=35
I am experiencing the same issue with Eclipse version 3.6.1 (Ant 1.7.1) org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(Unknown Source) at org.eclipse.ant.internal.ui.model.AntModel.processAntHome(AntModel.java:485) at org.eclipse.ant.internal.ui.model.AntModel.initializeProject(AntModel.java:371) at org.eclipse.ant.internal.ui.model.AntModel.prepareForFullParse(AntModel.java:346) at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:309) at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:267) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1393) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1403) at org.eclipse.ant.internal.ui.AntUtil.getTargets(AntUtil.java:242) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:63) at org.eclipse.ant.internal.ui.views.AntView.handleBuildFileChanged(AntView.java:160) at org.eclipse.ant.internal.ui.views.AntView.handleChangeDelta(AntView.java:674) at org.eclipse.ant.internal.ui.views.AntView.resourceChanged(AntView.java:649) at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285) at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149) at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:327) at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1181) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1984) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118) at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:75) at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:65) at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:456) at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:772) at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:4879) at org.eclipse.ui.texteditor.AbstractTextEditor.doSave(AbstractTextEditor.java:4668) at org.eclipse.ant.internal.ui.editor.AntEditor.doSave(AntEditor.java:1036) at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7003) at org.eclipse.ui.Saveable.doSave(Saveable.java:214) at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:349) at org.eclipse.ui.internal.SaveableHelper$3.run(SaveableHelper.java:195) at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:277) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2600) at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:285) at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:264) at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:207) at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:144) at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1369) at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:3334) at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3347) at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:76) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185) at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1253) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1103) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1099) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1508) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4268) at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4160) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383) eclipse.buildId=M20100909-0800 java.version=1.6.0_24 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR Framework arguments: -Xms512m -Xmx1532m -XX:PermSize=128m -XX:MaxPermSize=256m Command-line arguments: -os win32 -ws win32 -arch x86_64 -data P:\db4o\trunk -Xms512m -Xmx1532m -XX:PermSize=128m -XX:MaxPermSize=256m
I had the same problem. I had the "Installed JRE" pointing to the jre folder and when I changed it to pointing to the jdk folder it solves the problem. I dont know why but it worked for me. Before: C:\Program Files\Java\jdk1.6.0\jre After : C:\Program Files\Java\jdk1.6.0 I hope this can help anyone.
I have the same problem here using Eclipse Indigo SR2. Most of the time I can view an ant file in the ant editor, but once in a while (I think when I'm using a lot of ant files) this suddenly changes and I cannot open any ant file anymore with the ant editor. I can however open it using the XML editor. When I restart Eclipse everything works again.
Same story here as reported by Carla Jansen. I'm using Indigo SR 2, Build id: 20120216-1857, but I also saw the same behavior in previous versions. I use only a few ant files, so the problem is not in amount of open files. For me this happens when I try to open editor with an ant target from the Ant view. After error appears for the first time, it is not possible to use Ant editor at all until Eclipse is restarted.
I experienced this issue also in the latest version (quite often in the last time!) - Stacktrace: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(Unknown Source) at org.eclipse.debug.internal.ui.views.launch.LaunchView.partActivated(LaunchView.java:1417) at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:4505) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.WorkbenchPage.firePartActivated(WorkbenchPage.java:4503)
David's solution is not helping me (Win7, Juno 20130225-0426, java 1.7) By the way: I pretty surprised this bug is still "new" after 7+ years. It is by far the most voted for ant bug with 33 votes compared to 6 votes for number two. Is there anybody from the Platform team who can state your plans on this?
(In reply to comment #45) > David's solution is not helping me (Win7, Juno 20130225-0426, java 1.7) > > By the way: I pretty surprised this bug is still "new" after 7+ years. Its still 'new' because noone is looking at it. > It is > by far the most voted for ant bug with 33 votes compared to 6 votes for > number two. Is there anybody from the Platform team who can state your plans > on this? There have been no plans for this bug as none of the committers have ever been able to reproduce it. Tobias, if you can reproduce it, can you attach the build file that causes the exceptions, any steps to make it happen, a listing of all of the plugins you have installed and also try to reproduce using a stock Eclipse with nothing else installed from http://download.eclipse.org/eclipse/downloads/ I will have a look at it, but I use the Ant tooling most every day (for 10 years) and have not seen this once (FWIW).
For what it is worth, I get this problem frequently, nearly daily. For confidentiality reasons I cannot share the build script (I wish I could - I know that really makes it tough to reproduce), but the one thing that I think *may* be pertinent is that the main build script does an import of another script which is shared by several projects, and this imported script has a large number of macrodefs in it that the main script uses heavily. (We do this so we have team-standard ways of doing certain thing in Ant). Maybe that can help reproduce the issue elsewhere? Eclipse/workstation configuration: Win 7 64bit, JDK 1.7.0_25, Ant 1.9.1, Eclipse Kepler 64-bit (Build ID 4.3.0.I20130605-2000)
Created attachment 234670 [details] More Stacktraces (incl. parts with LaunchView and ant builder ) > Tobias, if you can reproduce it, can you attach the build file that causes the > exceptions, any steps to make it happen, a listing of all of the plugins you > have installed and also try to reproduce using a stock Eclipse with nothing else > installed from http://download.eclipse.org/eclipse/downloads/ For me it happens with different build files. I usually have multiple files open at the same time and also running some as builders and/or through the ant-view. I have not been able to design a test scenario yet that provokes the error, so I can't test it with a stock eclipse. But I have enabled remote debugging, so I can get a little more info than just a stack trace. I have just experience this a short while ago, but a little bit different than usual. Normally it happens once every time I open an ant editor. Today the exception first was thrown continuously - possibly every time the UI was refreshed - even without any editors open. I found out that this because the "Debug" view set a system property in LaunchView.partActivated (stack trace attached). Closing the Debug view got rid of that problem. But after this I couldn't open any ant editors as usual, again with the stack trace going through AntModel. Before this happened the log shows two stack traces (also attached). One is from perfoce because my password just expired and is probably not related. The second is from a failed ant build executed by an external tool builder. I was working with a new ant file and got quite a few failures during that. After the errors started showing, I attached a debugger (from another Eclipse) to see what was going on. I'm not really sure what to look for while debugging my own Eclipse, but I can confirm that "fRestrictedThread" is the main thread. More interesting I noted something in AntModel.parseDocument(..). At line 361 the security manager in System is temporarily switched to the AntSecurityManager, and then back to the old one in line 369. BUT when the errors occur, the old manager is also an AntSecurityManager - which I assume it shouldn't be. So what I think might happening is one of two things: 1. Some place a AntSecurityManager is assigned but not removed again. This might be because the removal is not done in a finally block. I have not been able to search for this, but it should be rather simple to check in the source code. 2. There is a race condition somewhere, where two threads simultaneously sets the manager to temporarily be an AntSecurityManager like the below example. I have however not been able to design a scenario where I provoke this. - Thread 1 gets the current security manager (managerA) - Thread 1 sets a new AntSecurityManager (antManagerB) - Thread 2 gets the current SecurityManager (antManagerB) - Thread 2 sets a new AntSecurityManager (antManagerC) - Thread 1 finishes and resets the security manager to managerA - Thread 2 finishes and "resets" the security manager to antManagerB - In the end antManagerY remains the security manager, although all methods resets the manager.
Created attachment 234801 [details] Provoked race conditions PLUS Threads that sets System's security manager outside of the main thread. I think I have found at least one case of this race condition. It is hard to reproduce with a clean standard eclipse, but we have some additional features installed, and some of them greatly increases the probability. I haven't found out which yet, but I'll try to figure it out. It happens when you have an ant project ant builder, that executes in the same JVM as Eclipse. If it runs while you are editing/saving an ant file, the race condition can occur. An example setup could be like this: Imaginge this workspace - ProjectA someAntScript.ant .... - ProjectB copyProjectA.ant - A-copy [Destination for a copy of ProjectA] "copyProjectA.ant" copies everything from ProjecA to ProjectB/A-copy. It is executed automatically with an external tool builder. The "workingset of relevant resources" of the tool builder is set to be all of ProjectA, so when the someAntScript.ant changes a build is fired. This increases the risk of the race condition. I have found two places that temporarily replaces the security manager. The first is AntModel.reconcile() which switches the Workspace manager in AntModel.parseDocument(). This is called by the main thread whenever the file is saved, opened etc. It is also called outside the main thread. This happens when you edit a build file and the JFace reconcilier and hover manager will trigger AntModel.reconcile(). (See attached stack) The second is when the external tool builder runs. It replaces the security manager in InternalAntRunner.run() (See attached stack) In AntModel.reconcile() the switch are done behind a common lock, so there is no race condition between those. The InternalAntRunner is however not behind any lock, and can race with any of the AntModel.reconcile() calls. If you edit a build file at the same time a ant build is starting or stopping, the race condition might occur. I have attached some examples of this as well.
Today while working with Ant build in Kepler [4.3.1], I got an exception in Eclipse log and Ant builds are stalled until the restart of Eclipse !ENTRY com.liferay.ide.core 1 0 2013-11-21 11:48:12.417 !MESSAGE No liferay project providers registered for type: class org.eclipse.core.internal.resources.Project !ENTRY com.liferay.ide.core 1 0 2013-11-21 11:48:13.841 !MESSAGE No liferay project providers registered for type: class org.eclipse.core.internal.resources.Project !ENTRY com.liferay.ide.core 1 0 2013-11-21 11:49:14.812 !MESSAGE No liferay project providers registered for type: class org.eclipse.core.internal.resources.Project !ENTRY com.liferay.ide.core 1 0 2013-11-21 11:49:21.295 !MESSAGE No liferay project providers registered for type: class org.eclipse.core.internal.resources.Project !ENTRY org.eclipse.jface 4 0 2013-11-21 11:49:26.849 !MESSAGE Unhandled event loop exception during blocked modal context. !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.ant.core.AntSecurityException) at org.eclipse.swt.SWT.error(SWT.java:4397) at org.eclipse.swt.SWT.error(SWT.java:4312) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4145) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507) at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275) at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970) at org.eclipse.ant.internal.ui.views.actions.AddBuildFilesAction.run(AddBuildFilesAction.java:63) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426) Caused by: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(Unknown Source) at org.eclipse.ant.internal.ui.model.AntModel.processAntHome(AntModel.java:517) at org.eclipse.ant.internal.ui.model.AntModel.initializeProject(AntModel.java:403) at org.eclipse.ant.internal.ui.model.AntModel.prepareForFullParse(AntModel.java:377) at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:340) at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:298) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1429) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1439) at org.eclipse.ant.internal.ui.AntUtil.getTargets(AntUtil.java:256) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:63) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:86) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.getLabel(AntProjectNodeProxy.java:106) at org.eclipse.ant.internal.ui.model.AntElementNode.getElementIdentifier(AntElementNode.java:353) at org.eclipse.ant.internal.ui.model.AntElementNode.getElementPath(AntElementNode.java:339) at org.eclipse.ant.internal.ui.model.AntElementNode.equals(AntElementNode.java:392) at java.util.ArrayList.indexOf(Unknown Source) at java.util.ArrayList.contains(Unknown Source) at org.eclipse.ant.internal.ui.views.AntViewContentProvider.add(AntViewContentProvider.java:40) at org.eclipse.ant.internal.ui.views.AntView.addProject(AntView.java:458) at org.eclipse.ant.internal.ui.views.actions.AddBuildFilesAction$2.run(AddBuildFilesAction.java:75) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) ... 41 more !ENTRY org.eclipse.ui 4 0 2013-11-21 11:49:31.650 !MESSAGE Unhandled event loop exception !STACK 0 org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(Unknown Source) at org.eclipse.ant.internal.ui.model.AntModel.processAntHome(AntModel.java:517) at org.eclipse.ant.internal.ui.model.AntModel.initializeProject(AntModel.java:403) at org.eclipse.ant.internal.ui.model.AntModel.prepareForFullParse(AntModel.java:377) at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:340) at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:298) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1429) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1439) at org.eclipse.ant.internal.ui.AntUtil.getTargets(AntUtil.java:256) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:63) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:86) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.getChildNodes(AntProjectNodeProxy.java:124) at org.eclipse.ant.internal.ui.model.AntModelContentProvider.getChildren(AntModelContentProvider.java:43) at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1374) at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:391) at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:917) at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:620) at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:820) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:797) at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644) at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:768) at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(AbstractTreeViewer.java:1500) at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeViewer.java:952) at org.eclipse.jface.viewers.AbstractTreeViewer$4.treeExpanded(AbstractTreeViewer.java:1511) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:132) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066) at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:7612) at org.eclipse.swt.widgets.Control.wmNotify(Control.java:5617) at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1935) at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:5169) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4667) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2443) at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1534) at org.eclipse.swt.widgets.Tree.WM_LBUTTONDOWN(Tree.java:6482) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4647) at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:6005) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426) !ENTRY com.liferay.ide.core 4 0 2013-11-21 11:49:33.341 !MESSAGE Could not determine liferay portal version. !STACK 0 java.lang.NullPointerException at org.apache.maven.artifact.versioning.ComparableVersion.parseVersion(ComparableVersion.java:354) at org.apache.maven.artifact.versioning.ComparableVersion.<init>(ComparableVersion.java:345) at org.apache.maven.artifact.versioning.DefaultArtifactVersion.parseVersion(DefaultArtifactVersion.java:110) at org.apache.maven.artifact.versioning.DefaultArtifactVersion.<init>(DefaultArtifactVersion.java:46) at com.liferay.ide.maven.core.MavenUtil.getVersion(MavenUtil.java:335) at com.liferay.ide.maven.core.LiferayMavenProject.getPortalVersion(LiferayMavenProject.java:211) at com.liferay.ide.core.MinimumRequiredPortalVersion.test(MinimumRequiredPortalVersion.java:51) at org.eclipse.core.internal.expressions.Property.test(Property.java:58) at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:99) at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53) at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29) at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53) at org.eclipse.core.internal.expressions.AdaptExpression.evaluate(AdaptExpression.java:105) at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53) at org.eclipse.core.internal.expressions.EnablementExpression.evaluate(EnablementExpression.java:53) at org.eclipse.ui.internal.ObjectActionContributor$ObjectContribution.isApplicableTo(ObjectActionContributor.java:374) at org.eclipse.ui.internal.ObjectActionContributor.isApplicableTo(ObjectActionContributor.java:242) at org.eclipse.ui.internal.ObjectContributorManager.isApplicableTo(ObjectContributorManager.java:303) at org.eclipse.ui.internal.ObjectActionContributorManager.contributeObjectActions(ObjectActionContributorManager.java:83) at org.eclipse.ui.internal.PopupMenuExtender.addObjectActions(PopupMenuExtender.java:325) at org.eclipse.ui.internal.PopupMenuExtender.menuAboutToShow(PopupMenuExtender.java:399) at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:343) at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:475) at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:470) at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:500) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:255) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:4964) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4640) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627) at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2075) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977) at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:257) at org.eclipse.swt.widgets.Display.runPopups(Display.java:4211) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3753) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426) !ENTRY org.eclipse.jface 4 0 2013-11-21 11:49:38.831 !MESSAGE Unhandled event loop exception during blocked modal context. !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.ant.core.AntSecurityException) at org.eclipse.swt.SWT.error(SWT.java:4397) at org.eclipse.swt.SWT.error(SWT.java:4312) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4145) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762) at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507) at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275) at org.eclipse.ui.internal.progress.ProgressManager$3.run(ProgressManager.java:960) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995) at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970) at org.eclipse.ant.internal.ui.views.actions.AddBuildFilesAction.run(AddBuildFilesAction.java:63) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426) Caused by: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at java.lang.System.setProperty(Unknown Source) at org.eclipse.ant.internal.ui.model.AntModel.processAntHome(AntModel.java:517) at org.eclipse.ant.internal.ui.model.AntModel.initializeProject(AntModel.java:403) at org.eclipse.ant.internal.ui.model.AntModel.prepareForFullParse(AntModel.java:377) at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:340) at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:298) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1429) at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(AntModel.java:1439) at org.eclipse.ant.internal.ui.AntUtil.getTargets(AntUtil.java:256) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:63) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.parseBuildFile(AntProjectNodeProxy.java:86) at org.eclipse.ant.internal.ui.model.AntProjectNodeProxy.getLabel(AntProjectNodeProxy.java:106) at org.eclipse.ant.internal.ui.model.AntElementNode.getElementIdentifier(AntElementNode.java:353) at org.eclipse.ant.internal.ui.model.AntElementNode.getElementPath(AntElementNode.java:339) at org.eclipse.ant.internal.ui.model.AntElementNode.equals(AntElementNode.java:392) at java.util.ArrayList.indexOf(Unknown Source) at java.util.ArrayList.contains(Unknown Source) at org.eclipse.ant.internal.ui.views.AntViewContentProvider.add(AntViewContentProvider.java:40) at org.eclipse.ant.internal.ui.views.AntView.addProject(AntView.java:458) at org.eclipse.ant.internal.ui.views.actions.AddBuildFilesAction$2.run(AddBuildFilesAction.java:75) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) ... 41 more !ENTRY org.eclipse.osgi 4 0 2013-11-21 11:49:42.529 !MESSAGE Application error !STACK 1 org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at org.eclipse.osgi.framework.internal.core.FrameworkProperties.setProperty(FrameworkProperties.java:58) at org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo.setProperty(EclipseEnvironmentInfo.java:241) at org.eclipse.equinox.internal.app.Activator.setProperty(Activator.java:241) at org.eclipse.equinox.internal.app.EclipseAppHandle.setInternalResult(EclipseAppHandle.java:236) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:202) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426) !ENTRY org.eclipse.equinox.ds 4 0 2013-11-21 11:49:44.520 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: Exception in org.eclipse.equinox.internal.ds.Activator.stop() of bundle org.eclipse.equinox.ds. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:791) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:510) at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:566) at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1206) at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:592) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:257) at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:215) at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.suspend(InternalSystemBundle.java:284) at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:692) at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:600) at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:200) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426) Caused by: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at org.eclipse.osgi.framework.internal.core.FrameworkProperties.setProperty(FrameworkProperties.java:58) at org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo.setProperty(EclipseEnvironmentInfo.java:241) at org.eclipse.equinox.internal.ds.Activator.stop(Activator.java:230) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:771) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:764) ... 19 more Root exception: org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at org.eclipse.osgi.framework.internal.core.FrameworkProperties.setProperty(FrameworkProperties.java:58) at org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo.setProperty(EclipseEnvironmentInfo.java:241) at org.eclipse.equinox.internal.ds.Activator.stop(Activator.java:230) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:771) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:764) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:510) at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:566) at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1206) at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:592) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:257) at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:215) at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.suspend(InternalSystemBundle.java:284) at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:692) at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:600) at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:200) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426) !SESSION Thu Nov 21 11:49:45 IST 2013 ------------------------------------------ !ENTRY org.eclipse.equinox.launcher 4 0 2013-11-21 11:49:45.034 !MESSAGE Exception launching the Eclipse Platform: !STACK org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:226) at org.eclipse.osgi.framework.internal.core.FrameworkProperties.setProperty(FrameworkProperties.java:58) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:220) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
I'm seeing this in Eclipse Kepler very often now.
It might be a side effect of bug 86174 where fAllowSettingSystemProperties was introduced and System property setting is only disallowed when parsing within the Ant Editor.
Can someone add a sample project where it is happening frequently ? I could not reproduce while opening/editing of attached file. Seeing the stack trace , the possible cause and solution is identified and needs to be tested against the scenario.
Created attachment 242222 [details] Catching the exception while setting Anthome during parsing We have similar blocks when we are finally clearing Ant Home in parseDocument method. Method processAntHome helps in getting home and lib value while parsing the documents, so adding this try/ catch looks better option than stopping the initialization of file.
The patch makes sense, if we are not the thread allowed to change ant.home then just continue on parsing / initializing using the currently set ant.home. I pushed the patch to: http://git.eclipse.org/c/platform/eclipse.platform.git/commit/?id=7e81b9b5e8ee45438ffaa1bb33534e63dda94b89 Thanks Sarika.
Created attachment 242509 [details] Draft proposal of how AntSecurityManager.java can fix the race condition I don't think the suggested patch looks like it will solve the problem, and I will request the bug to be reopened. The cause of this problem is a race condition as I have explained in comment 48+49. The suggested patch neither prevents the race condition from happening nor does it do anything to recover from it. To me it is like "curing" a rash by putting a makeup on it to hide it, without preventing the cause nor use medicine to treat it. Additionally it does not handle the stack trace in attachment 234670 [details] (comment 48). To solve this the 'right' way, we should prevent the race condition from even happening. To do this, we must ensure that any number of threads can require the AntSercurityManager in overlapping intervals. I will suggest the AntSercurityManager to handle this in a static synchronized way. I have attached a patch that shows how this could be done. It is just a first draft, and I have not tested it in any way. It also includes a few TODO's for scenarios which requires someone more qualified than me to determine how they should be handled. As this changes the way AntSercurityManager is used, the classes InternalAntRunner and AntModel should be updated to reflect these changes. As this is an internal class I do not expect this to be a problem.
(In reply to Tobias Bertelsen from comment #56) > Created attachment 242509 [details] > Draft proposal of how AntSecurityManager.java can fix the race condition > > I don't think the suggested patch looks like it will solve the problem, and > I will request the bug to be reopened. You are 100% correct, the patch does not solve the underlying problem, but it does allow parsing to continue and your workspace to keep working. > As this changes the way AntSercurityManager is used, the classes > InternalAntRunner and AntModel should be updated to reflect these changes. > As this is an internal class I do not expect this to be a problem. Would you like to finish your contribution and push it to gerrit for review?
I might have a go on that. I'm on vacation right now, so it will not be within the next two weeks. I barely have any experience with contributing – only uploading patches to a bug report like this. What is the best way I can push the changes to you? Is there perhaps a guide somewhere, that you can link me to? :) -Tobias
(In reply to Tobias Bertelsen from comment #58) > I might have a go on that. > I'm on vacation right now, so it will not be within the next two weeks. > I barely have any experience with contributing – only uploading patches to a > bug report like this. What is the best way I can push the changes to you? Is > there perhaps a guide somewhere, that you can link me to? :) > > -Tobias This should help you: https://wiki.eclipse.org/Ant/Developers
bug still here after almost 9 years After running eclipse longer tiem, I get it for example with each click from java editor(java file open) to Package Explorer or back eclipse.buildId=4.4.0.I20140606-1215 java.version=1.8.0_25 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Framework arguments: -product org.eclipse.epp.package.standard.product Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.standard.product Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". org.eclipse.ant.core.AntSecurityException at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:280) at org.eclipse.ant.internal.core.AntSecurityManager.checkPermission(AntSecurityManager.java:283) at java.lang.System.setProperty(System.java:789) at org.eclipse.debug.internal.ui.views.launch.LaunchView.partActivated(LaunchView.java:1460) at org.eclipse.ui.internal.WorkbenchPage$16.run(WorkbenchPage.java:4806) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.WorkbenchPage.firePartActivated(WorkbenchPage.java:4803) at org.eclipse.ui.internal.WorkbenchPage.access$18(WorkbenchPage.java:4782) at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:203) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$3.run(PartServiceImpl.java:234) . . .
Sorry. Forgot this over the summer. I have pushed the changes to Gerrit for review: https://git.eclipse.org/r/#/c/39989/
(In reply to Tobias Bertelsen from comment #61) > Sorry. Forgot this over the summer. > I have pushed the changes to Gerrit for review: > > https://git.eclipse.org/r/#/c/39989/ Thank you very much for the proposed fix Tobias! We are releasing 4.5M5 this week, so we will review your fix next week.
(In reply to Michael Rennie from comment #62) > (In reply to Tobias Bertelsen from comment #61) > > Sorry. Forgot this over the summer. > > I have pushed the changes to Gerrit for review: > > > > https://git.eclipse.org/r/#/c/39989/ > > Thank you very much for the proposed fix Tobias! We are releasing 4.5M5 > this week, so we will review your fix next week. A few things: 1. There are test failures related to the fix in the core test suite: testClasspathOrdering testClasspathOrderingDeprecated both of those tests are failing with AntSecurityExceptions. The problem is that the Java task wants to set the security manager (see org.apache.tools.ant.types.Permissions.setSecurityManager()) and with the new scheme, it can no longer do so, breaking anyone trying to run the java Ant task. 2. the comment on the fAllowSettingSecurityManager field is incomplete (minor)
We can allow the security manager to be overwritten, but that will still leave the same race condititon possible. Say we these two threads: A and B executing like this (`// sm` indicates value of System.security ): // sm == null A1: AntSecurityManager.setAsManager() // sm == AntSecurityManager B1: permissions.setSecurityManager() // sm == Permissions A2: AntSecurityManager.removeAsManager() // sm == null --- PROBLEM B2: permissions.restoreSecurityManager() // sm == AntSecurityManager I cannot see a way to have a thread safe, non-blocking security manager that allows it self to be exchanged with something else. I see three options, neither of which are attractive 1. Keep preventing the SM to be replaced (current code) 2. Allow SM to be replaced, and hope for the best. (Above race condition can happen) 3. Synchronize on System.class and allow replacement. If a security manager replaces the AntSM in this thread, we trust they replace AntSM once done (like Permissions) If an other thread starts to intervene, they will just wait until we're done This will solve the race condition, but possibly slow everything a lot. I can't help to wonder whether we changing the global security manager is really the right way to achieve the goal of this class. It seems like there should be a more policy based approach, for example like this blog post: http://www.jayway.com/2014/06/13/sandboxing-plugins-in-java/ Or this answer: http://stackoverflow.com/a/502388/722929 I have no experience with classloaders, but it seems like it should also be possible to create a new static System, with a security manager that only applies to classes loaded by that class-loader. http://stackoverflow.com/questions/5950025/multiple-instances-of-static-variables What do you think?
Shouldn't that change have been to "4.5M7"? 4.4M7 was released last year...
Thanks for pointing out the mistake.
Not sure of its impact, but when I start getting this exception, if I go edit .metadata/.plugins/org.eclipse.ant.ui/dialog_settings.xml and set filterInternalTargets="false" the issue will disappear for a while.
Maybe goes without saying, but I should probably add that I need to exit eclipse, then apply the change described above, then reopen eclipse, for it to have an effect.
Moving out of 4.6 !! We don't have a concrete approach to fix the problem.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.