Bug 232849 - Job Rule error when generating entities in a team-shared project
Summary: Job Rule error when generating entities in a team-shared project
Status: CLOSED DUPLICATE of bug 290061
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: Framework (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Paul Fullbright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 233270
Blocks:
  Show dependency tree
 
Reported: 2008-05-19 15:06 EDT by Tom Mutdosch CLA
Modified: 2009-11-02 16:35 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Mutdosch CLA 2008-05-19 15:06:58 EDT
I have a project shared using the Pessimistic Filesystem Provider included in the eclipse examples.  When I run the Generate Entities action (where I leave teh default source project for the current project, and specify a new package) and click Finish, I get an error dialog with the following exception, and no entities are generated:

java.lang.IllegalArgumentException: Attempted to beginRule: R/, does not match outer scope rule: P/prohectoTeam
	at org.eclipse.core.runtime.Assert.isLegal(Unknown Source)
	at org.eclipse.core.internal.jobs.ThreadJob.illegalPush(Unknown Source)
	at org.eclipse.core.internal.jobs.ThreadJob.push(Unknown Source)
	at org.eclipse.core.internal.jobs.ImplicitJobs.begin(Unknown Source)
	at org.eclipse.core.internal.jobs.JobManager.beginRule(Unknown Source)
	at org.eclipse.core.internal.resources.WorkManager.checkIn(Unknown Source)
	at org.eclipse.core.internal.resources.Workspace.prepareOperation(Unknown Source)
	at org.eclipse.core.internal.resources.Workspace.run(Unknown Source)
	at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(Unknown Source)
	at org.eclipse.jdt.internal.core.PackageFragment.createCompilationUnit(Unknown Source)
	at org.eclipse.jpt.gen.internal.EntityGenerator.generateSourceFile(Unknown Source)
	at org.eclipse.jpt.gen.internal.EntityGenerator.generateEntity_(Unknown Source)
	at org.eclipse.jpt.gen.internal.EntityGenerator.generateEntity(Unknown Source)
	at org.eclipse.jpt.gen.internal.EntityGenerator.generateEntity(Unknown Source)
	at org.eclipse.jpt.gen.internal.PackageGenerator.buildEntity(Unknown Source)
	at org.eclipse.jpt.gen.internal.PackageGenerator.generateEntities(Unknown Source)
	at org.eclipse.jpt.gen.internal.PackageGenerator.generateEntities(Unknown Source)
	at org.eclipse.jpt.ui.internal.platform.base.EntitiesGenerator$GenerateEntitiesRunnable.runInWorkspace(Unknown Source)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(Unknown Source)
	at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)
Comment 1 Tom Mutdosch CLA 2008-05-19 16:19:30 EDT
Similar error from Synchronize Classes operation:
org.eclipse.core.internal.resources.ResourceException(null)[4]: java.lang.IllegalArgumentException: Attempted to beginRule: R/, does not match outer scope rule: P/jpatest
	at org.eclipse.core.runtime.Assert.isLegal(Unknown Source)
	at org.eclipse.core.internal.jobs.ThreadJob.illegalPush(Unknown Source)
	at org.eclipse.core.internal.jobs.ThreadJob.push(Unknown Source)
	at org.eclipse.core.internal.jobs.ImplicitJobs.begin(Unknown Source)
	at org.eclipse.core.internal.jobs.JobManager.beginRule(Unknown Source)
	at org.eclipse.core.internal.resources.WorkManager.checkIn(Unknown Source)
	at org.eclipse.core.internal.resources.Workspace.prepareOperation(Unknown Source)
	at org.eclipse.core.internal.resources.Workspace.run(Unknown Source)
	at org.eclipse.core.internal.resources.Workspace.run(Unknown Source)
	at org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider.run(Unknown Source)
	at org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider.checkout(Unknown Source)
	at org.eclipse.team.examples.pessimistic.PessimisticModificationValidator.checkout(Unknown Source)
	at org.eclipse.team.examples.pessimistic.PessimisticModificationValidator.promptAndCheckout(Unknown Source)
	at org.eclipse.team.examples.pessimistic.PessimisticModificationValidator.checkout(Unknown Source)
	at org.eclipse.team.examples.pessimistic.PessimisticModificationValidator.validateSave(Unknown Source)
	at org.eclipse.team.internal.core.FileModificationValidatorManager.validateSave(Unknown Source)
	at org.eclipse.core.internal.resources.Workspace$6.run(Unknown Source)
	at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
	at org.eclipse.core.internal.resources.Workspace.validateSave(Unknown Source)
	at org.eclipse.core.internal.resources.File.setContents(Unknown Source)
	at org.eclipse.core.internal.resources.File.setContents(Unknown Source)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.commitFileBufferContent(Unknown Source)
	at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.commit(Unknown Source)
	at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.saveModel(Unknown Source)
	at org.eclipse.wst.sse.core.internal.model.AbstractStructuredModel.save(Unknown Source)
	at org.eclipse.wst.xml.core.internal.emf2xml.EMF2DOMSSERenderer.doSave(Unknown Source)
	at org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl.doSave(Unknown Source)
	at org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl.save(Unknown Source)
	at org.eclipse.jpt.core.internal.synch.SynchronizeClassesJob.runInWorkspace(Unknown Source)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(Unknown Source)
	at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)
Comment 2 Paul Fullbright CLA 2008-05-21 12:26:14 EDT
I've entered a bug against JDT for having a *very* broad scheduling rule for creating a compilation unit.  Our easiest fix is of course for them to narrow that rule.

We could also work around this by using the workspace root as a scheduling rule for generating entities.
Comment 3 Paul Fullbright CLA 2008-05-21 12:30:59 EDT
I was unable to reproduce with the synchronize classes operation, only with generating entities.  Are you still able to reproduce this part of it, and if so, can you give some more detailed steps?
Comment 4 Karen Butzke CLA 2009-11-02 16:35:59 EST
We fixed this recently in bug 290061 so I am marking this as a duplicate

*** This bug has been marked as a duplicate of bug 290061 ***