Community
Participate
Working Groups
When launching models from a running AMP instance a Runtime exception occurs. This appears to be a class loading problem introduced by the newer project loading mechanism, but perhaps simply has to do with project setup. Couldn't create project classloader; falling back to default loader org.eclipse.amp.escape.ide.LoaderCreationException: Problem creating classloaders. at org.eclipse.amp.escape.ide.ProjectLoader.<init>(ProjectLoader.java:79) at org.eclipse.amp.escape.ide.EclipseEscapeRunner.open(EclipseEscapeRunner.java:138) at org.eclipse.amp.escape.ide.EclipseEscapeRunner.open(EclipseEscapeRunner.java:105) at org.eclipse.amp.escape.ide.EclipseEscapeRunner.open(EclipseEscapeRunner.java:88) at org.eclipse.amp.escape.amf.ide.ExecuteAMFHandler.executeOpen(ExecuteAMFHandler.java:56) at org.eclipse.amp.escape.command.ExecuteHandler$1.run(ExecuteHandler.java:63) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.lang.IllegalStateException: Bundle cannot be found: org.eclipse.amp.escape.runtime at org.eclipse.amp.escape.ide.ProjectLoader.readDependencies(ProjectLoader.java:113) at org.eclipse.amp.escape.ide.ProjectLoader.<init>(ProjectLoader.java:73) ... 6 more This leads to: java.lang.RuntimeException: Couldn't find class: edu.brook.DemographicPrisonersDilemma at org.ascape.runtime.Runner.instanceFromName(Runner.java:925) at org.eclipse.amp.escape.ide.EclipseEscapeRunner.open(EclipseEscapeRunner.java:150) at org.eclipse.amp.escape.ide.EclipseEscapeRunner.open(EclipseEscapeRunner.java:105) at org.eclipse.amp.escape.ide.EclipseEscapeRunner.open(EclipseEscapeRunner.java:88) at org.eclipse.amp.escape.amf.ide.ExecuteAMFHandler.executeOpen(ExecuteAMFHandler.java:56) at org.eclipse.amp.escape.command.ExecuteHandler$1.run(ExecuteHandler.java:63) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) java.lang.RuntimeException: Couldn't find class: edu.brook.DemographicPrisonersDilemma at org.ascape.runtime.Runner.instanceFromName(Runner.java:925) at org.eclipse.amp.escape.ide.EclipseEscapeRunner.open(EclipseEscapeRunner.java:150) at org.eclipse.amp.escape.ide.EclipseEscapeRunner.open(EclipseEscapeRunner.java:105) at org.eclipse.amp.escape.ide.EclipseEscapeRunner.open(EclipseEscapeRunner.java:88) at org.eclipse.amp.escape.amf.ide.ExecuteAMFHandler.executeOpen(ExecuteAMFHandler.java:56) at org.eclipse.amp.escape.command.ExecuteHandler$1.run(ExecuteHandler.java:63) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) This
OK, I think I was able to make a quick fix of this. Jonas, please see: http://git.eclipse.org/c/amp/org.eclipse.amp.git/commit/?id=18c4e67c70565855d426d85782a699244a6c4019 And let me know if the logic looks right. I think the idea that the code was going for is that the bundle is ok if either a) there is no additional directive or b) the directive is optional. Is that correct?
This is a bug, indeed. But I think the bugfix is not quite error free. The intention is to make the project loader use all available plugins that are set as dependencies in the MANIFEST.MF file. Those that are marked as optional only need to be loaded if they are available. If a required plugin is missing, this should lead to an error. I've corrected this bug and added a test class to make sure this works now. You might want to add more test cases to make sure you're not getting your error again. (In reply to comment #1) > OK, I think I was able to make a quick fix of this. Jonas, please see: > > http://git.eclipse.org/c/amp/org.eclipse.amp.git/commit/?id=18c4e67c70565855d426d85782a699244a6c4019 > > And let me know if the logic looks right. I think the idea that the code was > going for is that the bundle is ok if either a) there is no additional > directive or b) the directive is optional. Is that correct?