Why does a MOF Import need to be clustered to allow cross-package inheritance?

Matthias Rieger <[email protected]> Mon, 30 Jan 2006 17:52:16 +0100
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Message-ID <[email protected]>
Hi

I'm having a problem with import between two MOF packages.
According to the MOF 1.4 specification (2.3.6.3 Package Importing, p.=20
2-16)

    Here are some examples of how a Package can reuse imported =20
elements. The importing
    Package can declare:
    =95 Classes whose supertypes are imported Classes, and
    ...

As XMI serialization I now have MOF package P1 which imports MOF =20
package P2
  (with isClustered=3Dfalse).
Class A from package P1 has a superclass B from package P2 (that's what
the specification cited above explicitly allows). I load the XMI into =20=

the MDR and
when I instantiate package P1 like this:

	repository.createExtent("Name",packageP1);

the MDR runs into the following error while the class file for the =20
proxy interface of package P1
is being generated (error message truncated and aliased):

   Package definition is incomplete: class A super =3D B
   	at org.netbeans.mdr.NBMDRepositoryImpl.resolveSuperclasses=20
(NBMDRepositoryImpl.java:898)
	at org.netbeans.mdr.NBMDRepositoryImpl.instantiatePackage=20
(NBMDRepositoryImpl.java:812)

Looking at the code (NBMDRepositoryImpl.java:898)
it seems like the superclass B is not found among the classProxies.
That is not so good. Now, when I set isClustered=3Dtrue in the above =20
Import, everything runs well.

Why do I need to set isClustered to true when the specification =20
allows simple imports to do
what  I need? Where does the fault lie?

Thanks for any enlightenment

Best regards

	Matthias Rieger