| [mddi-dev] How to manage a tool description file that reference external metamodels. |
|
Hello Chris,
Thank you very much for your feed
back.
Please see below for our suggestion for the
problem resolution.
Some tool integrators experience a
dangling link problem when registering a tool description that references
an external metamodel.
Concretely, such a tool description contains a HREF
refering to another XMI file that contains the metamodel.
For example :
<content name="ModelclassSpec2"
lower="1" upper="-1">
<metaClass
href=""/>
</content>
ModelBus can use the default EMF mechanism for
resolving this HREF.
This mechanism supports
1) the absulute HREF, similar to the presented
example
2) the relative HREF, relative to the execution
path of the JVM.
We suggest that the tool integrators use the
absolute path style because the JVM maybe executed in different locations
each time.
The dangling link problem occurs when the HREF
is not valid.
Consequently, ModelBus can not completely load the
tool description in order to send to the Registry.
To help tool integrators avoid this problem, we
have developped a tool for checking the HREFs in a tool
description.
(In fact, this tool can check HREFs in any XMI
file)
This tool is one Java file (with main methode). It
is available in the CVS repository, project org.eclipse.mddi.modelbus.adapter.test.
In order to use this tool, execute the java file
(with the same classpath libraries as the adapter)
java org.eclipse.mddi.modelbus.adapter.test.model.LinkTester [your XMI
file]
Please see the example models in http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.mddi/org.eclipse.mddi.modelbus/org.eclipse.mddi.modelbus.adapter.test/src/org/eclipse/mddi/modelbus/adapter/test/model/ex/?cvsroot=Technology_Project
This tool will report whether the XMI file contains
dangling HREFs.
Can you use this tool to check you tool
description?
If the HREFs are found, then please try
to correct them and recheck.
If the tool description file passes the checking
but ModelBus still generates error when registering the tool,
then please send us the tool description file with
metamodels and error logs, so that we can try analyse them
Best regards,
----------------------------
Prawee SRIPLAKICH LIP6 - Université Pierre et Marie Curie Office C1133 8, rue du Capitaine Scott, 75015 Paris - France Tel: +33 (0) 1 44 27 88 61 Fax : +33 (0) 1 44 27 87 71 http://www-src.lip6.fr/homepages/Prawee.Sriplakich/
---------------------------- ----- Original Message ----- From: "Broecker, Christoph" <cab@xxxxxxxxxxx> To: <Prawee.Sriplakich@xxxxxxx> Cc: "Andrey Sadovykh" <andrey.sadovykh@xxxxxxxxxx>; <Xavier.Blanc@xxxxxxx> Sent: Friday, August 25, 2006 12:01 PM Subject: RE: Issue with ModelBus adapter v2 Andrey - Many thanks for the quick response. Prawee - I have tried replacing the meta-model path with an absolute one, but get exactly the same result when I run the test. Have you got any other ideas where this comes from or how I could test what is going wrong? Kind regards, Chris -----Original Message----- From: Andrey Sadovykh [mailto:andrey.sadovykh@xxxxxxxxxx] Sent: Freitag, 25. August 2006 08:58 To: Broecker, Christoph Cc: 'François Jaouen'; Prawee.Sriplakich@xxxxxxx; Xavier.Blanc@xxxxxxx Subject: RE : Issue with ModelBus adapter v2 Hi Chris, It seems that there is a "meta-model" involved. >From the first glance to the Maven.description, you have used a meta-model >to describe the ProjectModel type. Adapter tries to resolve this meta-model and fails. The reason for this is the path declaration in the description file. Please replace it by the absolute path to the meta-model. For the packaging in the release, the meta-model can be integrated within the description file and thus users won't need to redefine absolute path. The simplest way to get "all-in-one" description file is to register your "absolute path" description in the Web Registry. Then, the adapter will automatically integrate the meta-model within the description and register the right version in the Web Registry. Use Web Registry Client to download the final version of the description file. Regards, Andrey PS: BTW, I'm forwarding your request to Prawee, he's now the person responsible to ModelBus bug fixing. -------------------------------------------------------- mailto:andrey.sadovykh@xxxxxxxxxx -----Message d'origine----- De : Broecker, Christoph [mailto:cab@xxxxxxxxxxx] Envoyé : vendredi 25 août 2006 05:45 À : Andrey Sadovykh Cc : François Jaouen Objet : Issue with ModelBus adapter v2 Hi Andrey, As you have probably seen, I have released a new version of the Maven2 adapter. However, there is an issue regarding the use of ModelBus v2 as compared to v1.11. The tests run OK in version 1.11, but in version 2, I get the following error: [java] There was 1 error: [java] 1) testCreateProject(org.modelware.modelbus.adapter.maven.test.TestMavenAdapter )java.lang.NullPointerException [java] at org.eclipse.mddi.modelbus.adapter.infrastructure.registry.RegistryClient.get MetaModel(RegistryClient.java:353) [java] at org.eclipse.mddi.modelbus.adapter.infrastructure.registry.RegistryClient.get MetaModel(RegistryClient.java:344) [java] at org.eclipse.mddi.modelbus.adapter.infrastructure.registry.RegistryClient.reg isterResources(RegistryClient.java:299) [java] at org.eclipse.mddi.modelbus.adapter.infrastructure.registry.RegistryClient.reg isterResources(RegistryClient.java:332) [java] at org.eclipse.mddi.modelbus.adapter.infrastructure.registry.RegistryClient.loa dDescriptionsFromRegistry(RegistryClient.java:153) [java] at org.eclipse.mddi.modelbus.adapter.infrastructure.registry.RegistryClient.loa dDescriptionsFromRegistry(RegistryClient.java:176) [java] at org.eclipse.mddi.modelbus.adapter.infrastructure.registry.RegistryClient.loo kupToolByModelingService(RegistryClient.java:107) [java] at org.eclipse.mddi.modelbus.adapter.infrastructure.registry.RegistryManager.ge tToolDescription(RegistryManager.java:106) [java] at org.eclipse.mddi.modelbus.adapter.user.consumer.impl.GenericConsumerImpl.con sume(GenericConsumerImpl.java:59) [java] at org.modelware.modelbus.adapter.maven.test.TestMavenAdapter.setUp(TestMavenAd apter.java:116) What surprises me is that the other four tests (there are 5 in total) run through fine. Have you got any ideas about what the source of this problem could be? What has changed in the new ModelBus version? Kind regards, Christoph Broecker -- Christoph Broecker, PhD, Business Unit Manager, mailto:cab@xxxxxxxxxxx Zühlke Engineering GmbH, Düsseldorfer Straße 40a, 65760 Eschborn, Germany Tel: +49 6196 777 54 0 / Fax: +49 6196 777 54 54 / Mobile: +49 174 9323 565 -------------------------------------------------------------------------------- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.6/427 - Release Date: 24/08/2006 |