Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319047

Summary: IAE (non-matching rule) during Java Model initialization
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Jay Arthanareeswaran <jarthana>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, deepakazad, Olivier_Thomann
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Markus Keller CLA 2010-07-06 15:43:15 EDT
I20100608-0911

IAE (non-matching rule) during Java Model initialization, see log entry below.

I could reproduce like this in a workspace with many projects from CVS:
- switch to the Sychronize perspective
- Synchronized with Latest (non-model synchronization)
=> incoming changes in org.eclipse.jdt.core
- restart workbench
- populate if entries are not visible
- select org.eclipse.jdt.core
- context menu > Update 
=> error dialog

I guess the problem is that the Java plug-ins are initially not loaded. When I choose update, they are getting loaded, but jdt.core doesn't like to be loaded in a background thread. I did not have any changes in org.eclipse.ltk.ui.refactoring.tests (neither incoming nor outgoing).


Error
Tue Jul 06 21:24:36 CEST 2010
An internal error occurred during: "CVS Update".

java.lang.IllegalArgumentException: Attempted to beginRule: P/org.eclipse.ltk.ui.refactoring.tests, does not match outer scope rule: P/org.eclipse.jdt.core
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.internal.jobs.ThreadJob.illegalPush(ThreadJob.java:136)
at org.eclipse.core.internal.jobs.ThreadJob.push(ThreadJob.java:327)
at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:63)
at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:285)
at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:117)
at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1914)
at org.eclipse.core.internal.resources.Project.touch(Project.java:1263)
at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:115)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:793)
at org.eclipse.jdt.internal.core.JavaModelManager$11.run(JavaModelManager.java:2637)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2653)
at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1845)
at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:2705)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2645)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2783)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1915)
at org.eclipse.jdt.internal.core.JavaProject.getClasspathEntryFor(JavaProject.java:1403)
at org.eclipse.jdt.internal.core.JavaModelManager.createJarPackageFragmentRootFrom(JavaModelManager.java:975)
at org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:866)
at org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:827)
at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:2590)
at org.eclipse.jdt.internal.ui.model.JavaModelProvider.getMappings(JavaModelProvider.java:75)
at org.eclipse.core.resources.mapping.ModelProvider.getMappings(ModelProvider.java:141)
at org.eclipse.core.resources.mapping.ModelProvider.getMappings(ModelProvider.java:168)
at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.getMappings(SynchronizationScopeManager.java:100)
at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.getMappingsFromProviders(SynchronizationScopeManager.java:86)
at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.internalPrepareContext(SynchronizationScopeManager.java:204)
at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.access$0(SynchronizationScopeManager.java:187)
at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager$1.run(SynchronizationScopeManager.java:167)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.initialize(SynchronizationScopeManager.java:165)
at org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation.run(SafeUpdateOperation.java:88)
at org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation.run(CVSSubscriberOperation.java:61)
at org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation.run(SafeUpdateOperation.java:134)
at org.eclipse.team.internal.ui.actions.JobRunnableContext.run(JobRunnableContext.java:144)
at org.eclipse.team.internal.ui.actions.JobRunnableContext$ResourceJob.runInWorkspace(JobRunnableContext.java:72)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Dani Megert CLA 2010-07-07 03:59:07 EDT
See also bug 305043.
Comment 2 Jay Arthanareeswaran CLA 2010-07-07 04:15:37 EDT
After fix to bug 305043, SetContainerOperation no longer uses a schedule rule. So, perhaps the outer scope rule is being used by the CVS update operation. The problem happens probably because the container initialization operation didn't complete during the start-up and is kicked off again during the CVS update.

Investigating further.
Comment 3 Jay Arthanareeswaran CLA 2010-07-12 01:57:17 EDT
Looks like the first schedule rule is from the SafeUpdateOperation. And since the initialization hasn't happened by then it is invoked at that moment, which results in the error.

Markus, do you recollect the "Initializing Java Tooling" running or yet to start when you did the 'update'?
Comment 4 Markus Keller CLA 2010-07-12 09:43:07 EDT
(In reply to comment #3)
> Markus, do you recollect the "Initializing Java Tooling" running or yet to
> start when you did the 'update'?

It did not run on startup but started running when I executed the 'Update' command.
Comment 5 Eclipse Genie CLA 2020-03-12 07:46:16 EDT
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.