Re: java.lang.IllegalAr ​gumentException: Attempted to beginRule:

Mark Phippard <[email protected]>
Newsgroups gmane.comp.version-control.subversion.subclipse.user
Message-ID <CAHFaGCotZRhWhAComE-UcKd1yBEPbtsf_kmPAOia-jTyQCT0-A@mail.gmail.com>
Did you try with 1.8.12 which was released last week?  It included a
fix to a schedule rule violation.



On Tue, Jun 26, 2012 at 1:35 PM, Dyutimoy Sarkar
<[email protected]> wrote:
> Hi,
>
> I am using subclipse installed from the update site: http://subclipse.tigris.org/update_1.8.x
> subclipse: 1.8.11
> subversion client adapter: 1.8.3
> subversion javaHL native library Adapter: 1.7.5.2
>
> I am getting exception "java.lang.IllegalArgumentException: Attempted to beginRule: F/AppRules/src, does not match outer scope rule: F/AppRules/src/elvis" when I try to perform move operation using the interface org.eclipse.core.resources.IResource and the method public void move(IPath destination, boolean force, IProgressMonitor monitor) throws CoreException; Stack trace reported is
> java.lang.IllegalArgumentException: Attempted to beginRule: F/AppRules/src, does not match outer scope rule: F/AppRules/src/elvis
>    at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
>    at org.eclipse.core.internal.jobs.ThreadJob.illegalPush(ThreadJob.java:120)
>    at org.eclipse.core.internal.jobs.ThreadJob.push(ThreadJob.java:230)
>    at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:58)
>    at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:232)
>    at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:117)
>    at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1747)
>    at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1522)
>    at org.tigris.subversion.subclipse.core.client.OperationManager.endOperation(OperationManager.java:125)
>    at org.tigris.subversion.subclipse.core.client.OperationManager.endOperation(OperationManager.java:93)
>    at org.tigris.subversion.subclipse.core.resources.SVNMoveDeleteHook.moveFile(SVNMoveDeleteHook.java:187)
>    at org.eclipse.team.internal.core.MoveDeleteManager.moveFile(MoveDeleteManager.java:87)
>    at org.eclipse.core.internal.resources.Resource.unprotectedMove(Resource.java:1794)
>    at org.eclipse.core.internal.resources.Resource.move(Resource.java:1464)
>    at org.eclipse.core.internal.resources.Resource.move(Resource.java:1432)
>    at com.ebay.rules.tools.authoring.rename.wizard.RuleRenameWizardHandler.renameAndSetContentsForRule(RuleRenameWizardHandler.java:435)
>    at com.ebay.rules.tools.authoring.rename.wizard.RuleRenameWizardHandler.access$5(RuleRenameWizardHandler.java:384)
>    at com.ebay.rules.tools.authoring.rename.wizard.RuleRenameWizardHandler$RuleRename.renameRule(RuleRenameWizardHandler.java:320)
>    at com.ebay.rules.tools.authoring.rename.wizard.RuleRenameWizardHandler$RuleRename.run(RuleRenameWizardHandler.java:213)
>    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
>    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
>    at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
>    at com.ebay.rules.tools.authoring.util.RuleAuthoringUtil.openProgressMonitor(RuleAuthoringUtil.java:1050)
>    at com.ebay.rules.tools.authoring.rename.wizard.RuleRenameWizardHandler.execute(RuleRenameWizardHandler.java:93)
>    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
>    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.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
>    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
>    at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:770)
>    at org.eclipse.ui.menus.CommandContributionItem.access$10(CommandContributionItem.java:756)
>    at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:746)
>    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:3910)
>    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
>    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(NativeMethodAccessorImpl.java:39)
>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>    at java.lang.reflect.Method.invoke(Method.java:599)
>    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)
>    at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
>
> This can be reproduced using the following steps.
>
> 1. Please create AppRules Project
> 2. Please create the following folder structure in the AppRules project. src/elvis.
> 3. Create a file in the folder src/elvis. You can name the file OldFile.java
> 4. Using IResource.move(IPath destination, boolean force, IProgressMonitor monitor), please rename OldFile.java to RenamedFile.java.
>   e.g oldRuleFile.move(reNamedFile.getFullPath(), true,new NullProgressMonitor());
>
>
> When I dug into the problem I saw that mehtod move(IPath destination, boolean force, IProgressMonitor monitor) in the org.eclipse.core.internal.resources.Resource actually sets a move rule
> for the folder F/AppRules/src/elvis ( this is the rule top of the stack points to currently) . It subsequently delegates the call to SVNMoveDeleteHook to move the file. In the SVNMoveDeleteHook's move method, a call is made to OperationManager.getInstance().endOperation(false), which internally sets the refresh rule for on the folder F/AppRules/src and now the top of stack points to F/AppRules/src. Since we have more generic rule at the top of the stack, when there is a more specific rule already in the stack the exception mentioned above is thrown.
>
>
> Can you please help me to find I am doing anything wrong or is it an issue with the Subclipse.
>
> ------------------------------------------------------
> http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=2973345
>
> To unsubscribe from this discussion, e-mail: [[email protected]].



-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

------------------------------------------------------
http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=2973346

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.