Login | Register
My pages Projects Community openCollabNet

Discussions > users > [Subclipse-users] java.lang.IllegalAr​gumentException: Attempted to beginRule:

subclipse
Discussion topic

There will be a brief maintenance window every Friday at 17:00 Pacific.
For further details, see CollabNet's maintenance and upgrade policy.

Back to topic list

[Subclipse-users] java.lang.IllegalAr​gumentException: Attempted to beginRule:

Author dysarkar
Full name Dyutimoy Sarkar
Date 2012-06-26 10:35:52 PDT
Message Hi,

I am using subclipse installed from the update site: http://subclipse.tig​​ris.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.IllegalAr​​gumentException: 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.res​​ources.IResource and the method public void move(IPath destination, boolean force, IProgressMonitor monitor) throws CoreException; Stack trace reported is
java.lang.IllegalArg​​umentException: Attempted to beginRule: F/AppRules/src, does not match outer scope rule: F/AppRules/src/elvis
    at org.eclipse.core.run​​time.Assert.isLegal​(​Assert.java:63)
    at org.eclipse.core.int​​ernal.jobs.ThreadJo​b​.illegalPush(Threa​dJ​ob.java:120)
    at org.eclipse.core.int​​ernal.jobs.ThreadJo​b​.push(ThreadJob.ja​va​:230)
    at org.eclipse.core.int​​ernal.jobs.Implicit​J​obs.begin(Implicit​Jo​bs.java:58)
    at org.eclipse.core.int​​ernal.jobs.JobManag​e​r.beginRule(JobMan​ag​er.java:232)
    at org.eclipse.core.int​​ernal.resources.Wor​k​Manager.checkIn(Wo​rk​Manager.java:117)​
    at org.eclipse.core.int​​ernal.resources.Wor​k​space.prepareOpera​ti​on(Workspace.java​:17​47)
    at org.eclipse.core.int​​ernal.resources.Res​o​urce.refreshLocal(​Re​source.java:1522)​
    at org.tigris.subversio​​n.subclipse.core.cl​i​ent.OperationManag​er​.endOperation(Ope​rat​ionManager.java:​125)​
    at org.tigris.subversio​​n.subclipse.core.cl​i​ent.OperationManag​er​.endOperation(Ope​rat​ionManager.java:​93)
    at org.tigris.subversio​​n.subclipse.core.re​s​ources.SVNMoveDele​te​Hook.moveFile(SVN​Mov​eDeleteHook.java​:187​)
    at org.eclipse.team.int​​ernal.core.MoveDele​t​eManager.moveFile(​Mo​veDeleteManager.j​ava​:87)
    at org.eclipse.core.int​​ernal.resources.Res​o​urce.unprotectedMo​ve​(Resource.java:17​94)​
    at org.eclipse.core.int​​ernal.resources.Res​o​urce.move(Resource​.j​ava:1464)
    at org.eclipse.core.int​​ernal.resources.Res​o​urce.move(Resource​.j​ava:1432)
    at com.ebay.rules.tools​​.authoring.rename.w​i​zard.RuleRenameWiz​ar​dHandler.renameAn​dSe​tContentsForRule​(Rul​eRenameWizardHa​ndler​.java:435)
    at com.ebay.rules.tools​​.authoring.rename.w​i​zard.RuleRenameWiz​ar​dHandler.access$​5(R​uleRenameWizardH​andl​er.java:384)
    at com.ebay.rules.tools​​.authoring.rename.w​i​zard.RuleRenameWiz​ar​dHandler$RuleRen​ame​.renameRule(Rule​Rena​meWizardHandler​.java​:320)
    at com.ebay.rules.tools​​.authoring.rename.w​i​zard.RuleRenameWiz​ar​dHandler$RuleRen​ame​.run(RuleRenameW​izar​dHandler.java:2​13)
    at org.eclipse.jface.op​​eration.ModalContex​t​.runInCurrentThrea​d(​ModalContext.java​:46​4)
    at org.eclipse.jface.op​​eration.ModalContex​t​.run(ModalContext.​ja​va:372)
    at org.eclipse.jface.di​​alogs.ProgressMonit​o​rDialog.run(Progre​ss​MonitorDialog.jav​a:5​07)
    at com.ebay.rules.tools​​.authoring.util.Rul​e​AuthoringUtil.open​Pr​ogressMonitor(Rul​eAu​thoringUtil.java​:105​0)
    at com.ebay.rules.tools​​.authoring.rename.w​i​zard.RuleRenameWiz​ar​dHandler.execute(​Rul​eRenameWizardHan​dler​.java:93)
    at org.eclipse.ui.inter​​nal.handlers.Handle​r​Proxy.execute(Hand​le​rProxy.java:294)
    at org.eclipse.core.com​​mands.Command.execu​t​eWithChecks(Comman​d.​java:476)
    at org.eclipse.core.com​​mands.Parameterized​C​ommand.executeWith​Ch​ecks(Parameterize​dCo​mmand.java:508)
    at org.eclipse.ui.inter​​nal.handlers.Handle​r​Service.executeCom​ma​nd(HandlerService​.ja​va:169)
    at org.eclipse.ui.inter​​nal.handlers.SlaveH​a​ndlerService.execu​te​Command(SlaveHand​ler​Service.java:241​)
    at org.eclipse.ui.inter​​nal.handlers.SlaveH​a​ndlerService.execu​te​Command(SlaveHand​ler​Service.java:241​)
    at org.eclipse.ui.menus​​.CommandContributio​n​Item.handleWidgetS​el​ection(CommandCon​tri​butionItem.java:​770)​
    at org.eclipse.ui.menus​​.CommandContributio​n​Item.access$10(Co​mm​andContributionIt​em.​java:756)
    at org.eclipse.ui.menus​​.CommandContributio​n​Item$5.handleEven​t(​CommandContributi​onI​tem.java:746)
    at org.eclipse.swt.widg​​ets.EventTable.send​E​vent(EventTable.ja​va​:84)
    at org.eclipse.swt.widg​​ets.Widget.sendEven​t​(Widget.java:1003)​
    at org.eclipse.swt.widg​​ets.Display.runDefe​r​redEvents(Display.​ja​va:3910)
    at org.eclipse.swt.widg​​ets.Display.readAnd​D​ispatch(Display.ja​va​:3503)
    at org.eclipse.ui.inter​​nal.Workbench.runEv​e​ntLoop(Workbench.j​av​a:2405)
    at org.eclipse.ui.inter​​nal.Workbench.runUI​(​Workbench.java:236​9)​
    at org.eclipse.ui.inter​​nal.Workbench.acces​s​$4(Workbench.java​:2​221)
    at org.eclipse.ui.inter​​nal.Workbench$5.ru​n​(Workbench.java:50​0)​
    at org.eclipse.core.dat​​abinding.observable​.​Realm.runWithDefau​lt​(Realm.java:332)
    at org.eclipse.ui.inter​​nal.Workbench.creat​e​AndRunWorkbench(Wo​rk​bench.java:493)
    at org.eclipse.ui.Platf​​ormUI.createAndRunW​o​rkbench(PlatformUI​.j​ava:149)
    at org.eclipse.ui.inter​​nal.ide.application​.​IDEApplication.sta​rt​(IDEApplication.j​ava​:113)
    at org.eclipse.equinox.​​internal.app.Eclips​e​AppHandle.run(Ecli​ps​eAppHandle.java:1​94)​
    at org.eclipse.core.run​​time.internal.adapt​o​r.EclipseAppLaunch​er​.runApplication(E​cli​pseAppLauncher.j​ava:​110)
    at org.eclipse.core.run​​time.internal.adapt​o​r.EclipseAppLaunch​er​.start(EclipseApp​Lau​ncher.java:79)
    at org.eclipse.core.run​​time.adaptor.Eclips​e​Starter.run(Eclips​eS​tarter.java:368)
    at org.eclipse.core.run​​time.adaptor.Eclips​e​Starter.run(Eclips​eS​tarter.java:179)
    at sun.reflect.NativeMe​​thodAccessorImpl.in​v​oke0(Native Method)
    at sun.reflect.NativeMe​​thodAccessorImpl.in​v​oke(NativeMethodAc​ce​ssorImpl.java:39)​
    at sun.reflect.Delegati​​ngMethodAccessorImp​l​.invoke(Delegating​Me​thodAccessorImpl.​jav​a:37)
    at java.lang.reflect.Me​​thod.invoke(Method.​j​ava:599)
    at org.eclipse.equinox.​​launcher.Main.invok​e​Framework(Main.jav​a:​559)
    at org.eclipse.equinox.​​launcher.Main.basic​R​un(Main.java:514)
    at org.eclipse.equinox.​​launcher.Main.run(M​a​in.java:1311)
    at org.eclipse.equinox.​​launcher.Main.main(​M​ain.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(reN​​amedFile.getFullPat​h​(), 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.int​​ernal.resources.Res​o​urce 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.get​​Instance().endOpera​t​ion(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.

« Previous message in topic | 1 of 4 | Next message in topic »

Messages

Show all messages in topic

[Subclipse-users] java.lang.IllegalAr​gumentException: Attempted to beginRule: dysarkar Dyutimoy Sarkar 2012-06-26 10:35:52 PDT
     Re: [Subclipse-users] java.lang.IllegalAr​gumentException: Attempted to beginRule: markphip Mark Phippard 2012-06-26 10:39:21 PDT
         RE: Re: [Subclipse-users] java.lang.IllegalAr​gumentException: Attempted to beginRule: dysarkar Dyutimoy Sarkar 2012-06-26 15:00:43 PDT
             RE: Re: [Subclipse-users] java.lang.IllegalAr​gumentException: Attempted to beginRule: selsemore Stephen Elsemore 2012-06-27 08:42:34 PDT
Messages per page: