Re: incomplete package definition

Martin Matula <[email protected]> Wed, 26 Nov 2003 22:18:48 +0100
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Message-ID <[email protected]>
Hi Bin,
there has to be other superclass of CreateObjectAction that causes the 
problem. It is not possible that the superclass is not found if it is in 
the same package since the instantiation process consists of several 
phases. In one phase all the classes in the package being instantiated 
and all its nested/clustered packages are scanned and the corresponding 
class proxies are created and only then there is a phase that 
establishes relationships between class proxies based on the metamodel. 
This phase fails. But it means that the class proxy for one of 
CreateObjectAction superclasses was not created in the first phase.
Martin

Fu,Bin wrote:

> Hi, Martin,
> 
> I've create a package that clusters both of packages. But afterwards I get a
> similiar exception:
> 
> Exception: org.netbeans.api.mdr.CreationFailedException
> Cannot instantiate package because of unexpected exception:
> org.netbeans.mdr.util.DebugException: Package definition is incomplete:
> class CreateObjectAction super = MofClass$Impl  ID: .:0000000000000EB6  MID:
> .:00000000000001F8  OPCKG: .:0000000000000B1A
> 
> It is different from last time that the class "CreateObjectAction" extends a
> class which belongs to the same package as the subclass "CreateObjectAction"
> itself. I guess that when CreateObjectAction is initiated, its superclass
> has not initiated although they are in one same package. Is it right? If so,
> how to deal with it?
> 
> Thanks again.
> 
> Fu, Bin
> 
> 
> 
> 
> ----- Original Message ----- 
> From: "Martin Matula" <[email protected]>
> To: <[email protected]>
> Sent: Tuesday, November 25, 2003 8:55 PM
> Subject: Re: [mdr-dev] incomplete package definition
> 
> 
> 
>>Hi,
>>this usually happens when you try to instantiate a package, that
>>contains classes that inherit from classes in a different package that
>>is only imported (not clustered). In such case, the package cannot be
>>instantiated by itself. You need to create a package that clusters both
>>this package and the package defining the superclasses of the clasess in
>>this package and instantiate that.
>>Martin
>>
>>Fu,Bin wrote:
>>
>>
>>>Hi,
>>>
>>>When the method "createExtent" is invoke, following message will appear,
>>>what does it mean?
>>>
>>>Thanks in advance
>>>
>>>Fu, Bin
>>>
>>>
>>>
>>>Log: 1 msg: new package: .:000000000000137C, metapackage:
> 
> .:000000000000137B
> 
>>>Log: 1 msg: new package: .:0000000000001381, metapackage:
> 
> .:0000000000000DD4
> 
>>>Log: 1 msg: new package: .:0000000000001386, metapackage:
> 
> .:0000000000000DFE
> 
>>>Log: 1 msg: new package: .:0000000000001391, metapackage:
> 
> .:00000000000010C7
> 
>>>Log: 1 msg: new package: .:0000000000001399, metapackage:
> 
> .:00000000000010E5
> 
>>>Log: 1 msg: new package: .:00000000000013A6, metapackage:
> 
> .:00000000000010AE
> 
>>>Log: 1 msg: new package: .:00000000000013F6, metapackage:
> 
> .:0000000000000B9F
> 
>>>Exception: org.netbeans.api.mdr.CreationFailedException
>>>Cannot instantiate package because of unexpected exception:
>>>org.netbeans.mdr.util.DebugException: Package definition is incomplete:
>>>class MultiplicityElement super = MofClass$Impl  ID: .:0000000000000C5A
>>>MID: .:00000000000001F8  OPCKG: .:0000000000000B1A
>>>org.netbeans.api.mdr.CreationFailedException: Cannot instantiate package
>>>because of unexpected exception: org.netbeans.mdr.util.DebugException:
>>>Package definition is incomplete: class MultiplicityElement super =
>>>MofClass$Impl  ID: .:0000000000000C5A  MID: .:00000000000001F8  OPCKG:
>>>.:0000000000000B1A
>>>        at
>>>
> 
> org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryImpl.java:389
> )
> 
>>>        at
>>>
> 
> org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryImpl.java:242
> )
> 
>>>        at
>>>
> 
> org.netbeans.mdr.NBMDRepositoryImpl.createExtent(NBMDRepositoryImpl.java:230
> )
> 
>>>        at
>>>
> 
> com.gentleware.mdr.Uml2RepositoryCreator.createM1Package(Uml2RepositoryCreat
> or.java:132)
> 
>>>        at
>>>
> 
> com.gentleware.mdr.Uml2RepositoryCreator.refreshMetamodelInstance(Uml2Reposi
> toryCreator.java:69)
> 
>>>        at
>>>com.gentleware.uml2.Uml2Project.iniRepository(Uml2Project.java:34)
>>>        at com.gentleware.uml2.Uml2Project.<init>(Uml2Project.java:26)
>>>        at
>>>
> 
> com.gentleware.uml2.model.PoseidonUml2Connector.getCommandDiSmFactoryUml2(Po
> seidonUml2Connector.java:22)
> 
>>>        at
>>>com.gentleware.uml2.plugin.Uml20Install.initStuff(Uml20Install.java:112)
>>>        at
>>>com.gentleware.uml2.plugin.Uml20Install.access$000(Uml20Install.java:50)
>>>        at
>>>
> 
> com.gentleware.uml2.plugin.Uml20Install$MyActionListener.actionPerformed(Uml
> 20Install.java:219)
> 
>>>        at
>>>javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
>>>        at
>>>
> 
> javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButto
> n.java:1839)
> 
>>>        at
>>>
> 
> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4
> 20)
> 
>>>        at
>>>javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
>>>        at
>>>
> 
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener
> .java:245)
> 
>>>        at java.awt.Component.processMouseEvent(Component.java:5100)
>>>        at java.awt.Component.processEvent(Component.java:4897)
>>>        at java.awt.Container.processEvent(Container.java:1569)
>>>        at java.awt.Component.dispatchEventImpl(Component.java:3615)
>>>        at java.awt.Container.dispatchEventImpl(Container.java:1627)
>>>        at java.awt.Component.dispatchEvent(Component.java:3477)
>>>        at
>>>java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
>>>        at
>>>java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
>>>        at
> 
> java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
> 
>>>        at java.awt.Container.dispatchEventImpl(Container.java:1613)
>>>        at java.awt.Window.dispatchEventImpl(Window.java:1606)
>>>        at java.awt.Component.dispatchEvent(Component.java:3477)
>>>        at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
>>>        at
>>>
> 
> java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
> va:201)
> 
>>>        at
>>>
> 
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
> :151)
> 
>>>        at
>>>java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
>>>        at
>>>java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
>>>        at
> 
> java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
> 
>>
> 
>