Re: incomplete package definition
Martin Matula <[email protected]> Thu, 27 Nov 2003 18:51:26 +0100
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.devel |
|---|---|
| Message-ID | <[email protected]> |
The fact that they share the same root Java package does not mean that
they also share the same MOF root package. Aren't you using any
javax.jmi.packagePrefix tags to affect what Java package the classes get
generated into? Or maybe you have two different instances of library MOF
package. One contains uml2->actions->intermediateactions nested packages
and the other one contains uml2->activities->basicactivities nested
packages. Can you verify that that isn't the case? If you believe that
your metamodel is really correct, i.e. there is only one instance of
library MOF package that contains a single instance of uml2 MOF package
(as a nested package) that contains actions and activities, etc., please
create a new issue, attach your metamodel to it and provide steps to
reproduce the error. Or, if your metamodel cannot be disclosed, try to
create a similar metamodel that also causes this exception as a testcase.
Thanks,
Martin
Fu,Bin wrote:
> Hi, Martin,
>
> it sounds strange, but both class CreateObjectAction and its superclass
> are in the same top level package. Following Java code are generated by
> MDR browser with same xml source:
>
> "
> package library.uml2.actions.intermediateactions;
>
> /**
> * CreateObjectAction object instance interface.
> */
> public interface CreateObjectAction extends
> library.uml2.activities.basicactivities.Action {
>
> public library.uml2.classes.kernel.Classifier getClassifier();
>
> public void setClassifier(library.uml2.classes.kernel.Classifier
> newValue);
>
> public library.uml2.activities.basicactivities.OutputPin getResult();
>
> public void
> setResult(library.uml2.activities.basicactivities.OutputPin newValue);
> }
> "
>
> You see that they are in the same top level package of "library", and
> all the classes (interfaces) under "library" do not extend any classes
> (interfaces) out of range of "library".
> So what reason could be else? Or might it be a bug of MDR project?
>
>
> Fu, Bin
>
>
>
>
>
>
> ----- Original Message -----
> From: "Martin Matula" <[email protected] <mailto:[email protected]>>
> To: <[email protected] <mailto:[email protected]>>
> Sent: Wednesday, November 26, 2003 10:18 PM
> Subject: Re: [mdr-dev] incomplete package definition
>
> > 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]
> <mailto:[email protected]>>
> > > To: <[email protected] <mailto:[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)
> > >
> > >>
> > >
> > >
> >
> >