Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2491

Moving Drools DRL between packages leaves residual DRL information in workspace environment, causing ResourceException, Resource does not exist

    Details

    • Steps to Reproduce:
      Hide

      Open a DRL file in an editor
      Refactor->Rename the package containing the open DRL file
      Clean or otherwise cause a rebuild, exceptions now appear in log.

      Show
      Open a DRL file in an editor Refactor->Rename the package containing the open DRL file Clean or otherwise cause a rebuild, exceptions now appear in log.
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Edit the workbench.xml file and manually remove the old editor entry.

      Show
      Edit the workbench.xml file and manually remove the old editor entry.

      Description

      Aparently, Drools builder is attempting to build a file that has moved but has an editor descriptor that no longer exists because the underlying DRL was moved to another package.
      The workspace.xml has an <editor/> entry that still refers to the old package, and Drools Eclipse is trying to build it.
      There may be other problems and workarounds due to this.

      null
      Error
      Mon Apr 26 11:26:55 EDT 2010
      Internal error in Drools Plugin:

      org.eclipse.core.internal.resources.ResourceException: Resource '/Package/src/oldpackage/Rules.drl' does not exist.
      at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:326)
      at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:200)
      at org.eclipse.core.internal.resources.Resource.createMarker(Resource.java:717)
      at org.drools.eclipse.builder.DroolsBuilder$1.run(Unknown Source)
      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
      at org.drools.eclipse.builder.DroolsBuilder.createMarker(Unknown Source)
      at org.drools.eclipse.builder.DroolsBuilder.parseResource(Unknown Source)
      at org.drools.eclipse.builder.DroolsBuilder$DroolsBuildDeltaVisitor.visit(Unknown Source)
      at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)
      at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
      at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
      at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
      at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
      at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
      at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
      at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:48)
      at org.drools.eclipse.builder.DroolsBuilder.incrementalBuild(Unknown Source)
      at org.drools.eclipse.builder.DroolsBuilder.build(Unknown Source)
      at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
      at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
      at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
      at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
      at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
      at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

      From the workbench.xml
      <editor activePart="true" focus="true" id="org.drools.eclipse.editors.DRLRuleEditor" name="Rules.drl" partName="DomainRules.drl" path="C:/workspace/Project/src/oldpackage/Rules.drl" title="Rules.drl" tooltip="C:/workspace/Project/src/oldpackage/Rules.drl" workbook="DefaultEditorWorkbook">
      <input factoryID="org.eclipse.ui.part.FileEditorInputFactory" path="/C:/workspace/Project/src/oldpackage/Rules.drl"/>
      </editor>

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                KrisVerlaenen Kris Verlaenen
                Reporter:
                Eric Lindahl Eric Lindahl
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: