Skip to content
  Kermeta  

I've got a resource load exception

Document Actions
Read this if you got a kermeta::persistence::ResourceLoadException and don't know how to solve it.

Sometimes the error messages associated to the ressource load exception are not clear enough to find the real problem. Many of them are due to a misuse of one of the tools (including EMF tools and Omondo). If you don't find your solution here or in our documentation, please send us a mail on the user mailing list or submit a bug.

Here is a list of common errors that are of the responsability of the user.
Note that in some cases (and upon user request) we may try to add new tools or verifications that will decrease the risk to have them.
Note that following the Metamodel creation checklist will also help you in many cases.

EMF Loading error : could not find a class (null::DocumentRoot) in loaded libraries. Please check your require statements

This error occurs if :

  • you used a generated editor to build the model to load, and this editor was not installed in the workbench that runs Kermeta.
    Solution: deploy the editor in your workbench or run your Kermeta in the runtime workbench
  • you did not provide a correct NsURI for each of the packages of your metamodel
    Solution: put a "correct" NsURI for your packages. The most reliable URI corresponds to an absolute path that is Eclipse-dependent. This means that your URI should begin with "platform:/resource/" (corresponds to the directory of your Eclipse Workspace). "platform:/resource/<the_name_of_your_eclipse_project>/path/of/your/metamodel

EMF Loading error : could not find a class (OneOfMyPackage::OneOfMyMetaClass) in loaded libraries. Please check your require statements

This indicates that Kermeta didn't succeed to find a correct class definition in your kermeta file or in the dependencies (keyword require) that you provided.

Solution: first, please check that this Class really exists in the specified package path, and in one of the files that you specified in the require directives. Then, you have to add a dependency to the file that really contains the model definition (ie. the metamodel) using the "require" statement. You can use either the yourmetamodel.ecore file or yourmetamodel.kmt or yourmetamodel.km.
Note: This problem is usually checked by the type checker, but, if you specify one metamodel when you call createResource(...) or getResource(...) method, that is not exactly conform to the one you declared in your require, the type checker sometimes won't detect any error.