Hi,
The actual problem was due to, the model read during the first run is nulled out after
the generation is done.
After the generation there is a call to "repository.close()" which has following
implementation.
##############################
...................
.....................
if (model != null)
{
model.refDelete();
}
this.model = null;
###############################
Now in the second run, the cached repository has the modelFacade not null, but the
model set within is already nulled out, when " repository.close() " was called in last
run.
I think in the " getModel() " of MDRepositoryFacade the call to "
this.modelFacade.setModel(this.model); " can be placed outside of "if" statement
block.
Currently I have done the above change and 'm not having problems after, the
generation works fine.
Thanks & Regards,
Vikram Naik.
-----Original Message-----
From: Chad Brandon [mailto:[EMAIL PROTECTED]
Sent: Fri 8/20/2004 9:36 PM
To: Naik, Vikram; [EMAIL PROTECTED]
Cc:
Subject: RE: [Andromda-user] Metafacades not found in second run.
The call "modelElements.getAllMetafacades(); " exists
on org.andromda.core.cartridge.template.ModelElements
so you can take a look at why that collection isn't
being populated the second time or why its getting
cleared out. The population of this collection occurs
within the Cartridge class.
--- "Naik, Vikram" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can you point me to the classes I should look into ?
> Will try to corner it down.
>
> -Vikram.
>
> -----Original Message-----
> From: Chad Brandon [mailto:[EMAIL PROTECTED]
> Sent: Fri 8/20/2004 6:06 PM
> To: Naik, Vikram;
> [EMAIL PROTECTED]
> Cc:
> Subject: Re: [Andromda-user] Metafacades not found
> in second run.
>
>
>
> Not sure, probably a bug in the code (as I haven't
> tried it with more than one run before retarting
> the
> JVM) I'll take a look tonight, however if you find
> the issue feel free to let me know what it is and
> I'll
> fix it in CVS.
>
> Chad
>
> --- "Naik, Vikram" <[EMAIL PROTECTED]> wrote:
>
> > Hello,
> >
> > I am running AndroMDA process from a java class,
> > instead of using Ant. On the first run everything
> > works fine. But on the second run, the
> modelElements
> > in Cartridge returns empty collection of
> metafacades
> > for this call "
> modelElements.getAllMetafacades(); "
> >
> >
> > What could be the probable reason for this?
> >
> > -Vikram.
> >
>
HS^ÃÂÃÂÃÂà XÃÂÃÂÃÂ'ÃÂà ÃÅuÃÂÃââÃâ Ã
xÃÂÃÂ!rÃâÂÃâÂÃÂÃÂÃÂÃÂÃÂqÃÂ'VÃÂÃÂÃâÃÂÃâÂÃÂtÃâÃâÂÃÂxÃâ
>
>
PÃâÃÂÃÂÃÂÃâÂÃÂÃâouÃâJdJÃâÂÃÂp5CÃÂÃÂÃÂÃâÂÃÂÃâ}ÃâjÃÂÃÂÃâÃâÂÃÅEÃÂZÃ
Z'"yÃÂwÃÂÃÂÃÂJÃÂÃÂ)à jwEÃÂÃÂÃâ ÃâÂÃÂaÃÂÃÅÃÂ
>
0ÃÂ)ÃÂÃâÃâÃâÂÃÅ&ÃÂ?ÃËÃÂHÃÅÃÂ&ÃÂÃÂÃÂÃÂÃÂÃÂ?ÃÂ]<ÃÂo9wkÃÂgZÃÂÃâÃÂÃâÂÃÂÃÂÃ
x%Ã [EMAIL PROTECTED]
ÃâlÃÂÃâÂÃÂqÃÂÃÂÃÂÃÂzÃËmÃÂÃâÂ?ÃÂXÃÂÃÂÃâ(ÃÂÃÂ~Ã
à zwÃÂÃÂXÃÂÃÂÃÂÃÂà ÃâbÃÂÃÂ?jwkÃÂgZÃÂÃâÃÂ
>
>
>
>
HS^ÂÃÅÅXÂÂÅ'ÂÅÃuÂââÅxÂÃ!rââÂÂÂÅÃqÃ'VÂÂÃÂâÂtÃâÂxÅ
PÃÃÃÂâÃÃouÃJdJâÃp5CÃÃÂâÃÃ}ÃjÃÂÃâÃEÃZÅZ'"yÂwÂÂÅJÂÂ)ÃjwEÂÃââÃaÂÃÃ
0Â)ÃÃÅâÃ&Ã?ÃÅHÃÂ&ÂÂÂÂÂÃ?Ã]<[EMAIL
PROTECTED](ÂÂ~ÅÃzwÂÃXÂÂÃÃÅÃbÂÃ?jwkÂgZÂÃÂ