# Errors occurred during build and Import

**URL:** https://bnd.discourse.group/t/errors-occurred-during-build-and-import/476
**Category:** GENERAL
**Created:** [October 9, 2024, 3:12am UTC](https://bnd.discourse.group/t/errors-occurred-during-build-and-import/476 "2024-10-09T03:12:28Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![hengsin](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/hengsin/32/294_2.png) [@hengsin](https://bnd.discourse.group/u/hengsin)
#### Post date: [October 9, 2024, 3:12am UTC](https://bnd.discourse.group/t/errors-occurred-during-build-and-import/476/1 "2024-10-09T03:12:28Z")

</div>

My project is using bndtools 7.0.0 and I hit the following errors everytime I try to import the project (using either Import Existing Projects or Existing Bndtools Workspace) or doing a full rebuild in Eclipse:

Errors occurred during the build.  
Attempted to beginRule: MultiRule, does not match outer scope rule: R/

If I just ignore the errors, it does works fine in Eclipse after that. The project also build without any errors with ./gradlew build

Works fine in intellij 2024.2 too with amdatu plugin (using a custom build that support bndtools 7.0.0 - [hengsin / amdatu-idea / Downloads — Bitbucket](https://bitbucket.org/hengsin/amdatu-idea/downloads/)).

What shall I check here to get rid of the errors?

Thanks.

---

<div class="post-metadata">

### Author: ![chrisrueger](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/chrisrueger/32/18_2.png) [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)
#### Post date: [October 9, 2024, 10:18am UTC](https://bnd.discourse.group/t/errors-occurred-during-build-and-import/476/2 "2024-10-09T10:18:39Z")

</div>

> [@hengsin](#):
>
> Attempted to beginRule: MultiRule

This seems to be unrelated to bndtools.  
When I google this I find Eclipse / EGit related bugs e.g. [536472 – IAE: Attempted to beginRule: R/, does not match outer scope rule: ... in SquashCommitsOperation](https://bugs.eclipse.org/bugs/show_bug.cgi?id=536472)

---

<div class="post-metadata">

### Author: ![hengsin](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/hengsin/32/294_2.png) [@hengsin](https://bnd.discourse.group/u/hengsin)
#### Post date: [October 9, 2024, 12:06pm UTC](https://bnd.discourse.group/t/errors-occurred-during-build-and-import/476/3 "2024-10-09T12:06:08Z")

</div>

It seems to be caused by build. Below is the exception trace after Project \> Clean All…

```auto
java.lang.IllegalArgumentException: Attempted to beginRule: MultiRule[], does not match outer scope rule: R/
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:68)
	at org.eclipse.core.internal.jobs.ThreadJob.illegalPush(ThreadJob.java:144)
	at org.eclipse.core.internal.jobs.ThreadJob.push(ThreadJob.java:416)
	at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:66)
	at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:343)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:289)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:352)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:441)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:444)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:555)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:503)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:585)
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:595)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:484)
	at org.eclipse.ui.internal.ide.dialogs.CleanDialog.doClean(CleanDialog.java:355)
	at org.eclipse.ui.internal.ide.dialogs.CleanDialog$1.runInWorkspace(CleanDialog.java:159)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

```

---

<div class="post-metadata">

### Author: ![chrisrueger](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/chrisrueger/32/18_2.png) [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)
#### Post date: [October 9, 2024, 12:38pm UTC](https://bnd.discourse.group/t/errors-occurred-during-build-and-import/476/4 "2024-10-09T12:38:46Z")

</div>

The stacktrace contains only Eclipse classes, nothing with bnd.  
If bnd / bndtools would be involved then you should see `bnd` somewhere.

e.g. `aQute.bnd.XXXX` or `bndtools.XXXX`

Or this is not the full stack trace.

[here](https://github.com/de-jcup/eclipse-asciidoctor-editor/issues/425) is another open Github issue , where others seem to have the same problem.

---

<div class="post-metadata">

### Author: ![hengsin](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/hengsin/32/294_2.png) [@hengsin](https://bnd.discourse.group/u/hengsin)
#### Post date: [October 10, 2024, 12:47am UTC](https://bnd.discourse.group/t/errors-occurred-during-build-and-import/476/5 "2024-10-10T00:47:38Z")

</div>

This seems closest - [Attempted to beginRule: MultiRule[], does not match outer scope rule: R/ · Issue #376 · eclipse-platform/eclipse.platform · GitHub](https://github.com/eclipse-platform/eclipse.platform/issues/376) and it say it is due to custom builder.

---

<div class="post-metadata">

### Author: ![hengsin](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/hengsin/32/294_2.png) [@hengsin](https://bnd.discourse.group/u/hengsin)
#### Post date: [October 10, 2024, 1:40am UTC](https://bnd.discourse.group/t/errors-occurred-during-build-and-import/476/6 "2024-10-10T01:40:31Z")

</div>

Probably [org.eclipse.core.resources.IncrementalProjectBuilder.getRule(int, Map\<String, String\>) not properly implemented · Issue #535 · eclipse-pde/eclipse.pde · GitHub](https://github.com/eclipse-pde/eclipse.pde/issues/535) , perhaps for some reason the pde builder is still active. This is migrated from pde build and perhaps I’ve not clean up all pde stuffs.

Update: it is indeed cause by this pde bug. The workaround mention in the ticket (create a dummy pde project) works to remove the build error.
