Community
Participate
Working Groups
Hello, using java queries, I had the following message when I tried to use these queries in MoDisco model browser: The output location of the Java project 'org.eclipse.gmt.modisco.ecore.examples.aggregationtree' was not found in its Bundle-ClassPath. This prevents the Java queries implementations it contains from being loaded. (org.eclipse.gmt.modisco.infra.browser.uicore_0.9.0.201006041255) It seems the the query manager try to use Bundle-Classpath entry in Manifest.mf, however it is optional and should be correctly managed if the Bundle-Classpath entry has not been filled by the user (which is the default behavior). It could be generated (using default values = .,/bin for instance) or other ... Regards Gabriel
We added this message because the Bundle-ClassPath entry is necessary for the class to be found in the hot-loaded bundle. Otherwise, Bundle#loadClass fails with a ClassNotFoundException (I just tested and can confirm it still works this way). So, this message is here to help the user determine why her query cannot be loaded. This Bundle-ClassPath entry is automatically added when you create a new MoDisco project, so this shouldn't be much trouble in most cases.
Note: Buckminster failed to build several projects that had this "Bundle-ClassPath " set, with only a message stating "The project cannot be built until build path errors are resolved". After a while, I discovered that when you add an entry to the "Classpath" section of the "Runtime" tab in the Manifest.MF form editor, and leave the checkbox "Update the build path" checked, then PDE adds the directory to the project's Java classpath as well. When you add the "bin" directory this way, this makes the project depends on its own binaries, which is wrong. And this is the reason why the Buckminster build failed. So, we must be careful to uncheck "Update the build path" when adding an entry to the Bundle-ClassPath using the form editor (the MoDisco project creation wizard already does it correctly).
Not relevant