Hi Chad, The EntityFacade generalizise from the ClassfierFacade. In my metafacades I am only able to generalizise from ClassifierFacade...if I try to generalizise from EntityFacade I get the mentioned error.
Timo > -----Urspr�ngliche Nachricht----- > Von: Chad Brandon [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 7. April 2005 16:07 > An: Plodeck, Timo DPCOM, Bonn > Cc: [EMAIL PROTECTED]; [email protected] > Betreff: Re: AW: [Andromda-user] velocity template class variable api > > [EMAIL PROTECTED] wrote: > > >Hi all, > > > >According to the message below I have a similar problem with > the metafacades. > > > >I already followed the mentioned link and I looked into the > source of other cartridges in order to solve my problem but > nothing works. > > > >In my Metafacades I have a Generalization between the > metafacades "MyEntityFacade" and "EntityFacade" (from the > UMLMetafacadeModel). With "use Profile" I added the > UMLMetafacadeModel according to the ejb-cartridge. > > > >In the metafacades-descriptor I tried (according to the > ejb-cartridge) the following: > >... > ><metafacade > > metaobjectClass="org.omg.uml.foundation.core.UmlClassImpl" > > > metafacadeClass="de.dpcom.bpm.metafacades.uml.MyEntityFacadeLo > gicImpl"> > > <stereotype>Xxx</stereotype> > ></metafacade> > >... > > > >The building of the cartridge runs without any errors. But > when I use the cartridge and the new stereotype I get the > following error: > > > >------- AndroMDA Exception Recording ------- Version --> 3.0M3 Error > >--> Error performing ModelProcessor.process with model(s) > --> > 'jar:file:D:\dev\diplom\tpl\cartridgeTest\mda/src/uml/Cartridg > eTestModel.xml.zip!/CartridgeTestModel.xml' > >Main Exception --> Failed to construct a meta facade of type > 'class de.dpcom.bpm.metafacades.uml.MyEntityFacadeLogicImpl' > with metaObject of type --> 'class > org.omg.uml.foundation.core.UmlClass$Impl' > >Root Exception --> > org.andromda.core.metafacade.MetafacadeFactoryException: > MetafacadeFactory.getRegisteredProperty - no property > 'allowDefaultIdentifiers' registered under namespace --> > 'timosfirst:de.dpcom.bpm.metafacades.uml.MyEntityFacade' > >org.andromda.core.metafacade.MetafacadeFactoryException: > MetafacadeFactory.getRegisteredProperty - no property > 'allowDefaultIdentifiers' registered under namespace --> > 'timosfirst:de.dpcom.bpm.metafacades.uml.MyEntityFacade' > > at > org.andromda.core.metafacade.MetafacadeFactory.getRegisteredPr > operty(MetafacadeFactory.java:684) > > at > org.andromda.core.metafacade.MetafacadeBase.getConfiguredPrope > rty(MetafacadeBase.java:291) > > at > org.andromda.metafacades.uml14.EntityFacadeLogicImpl.isAllowDe > faultIdentifiers(EntityFacadeLogicImpl.java:533) > > at > org.andromda.metafacades.uml14.EntityFacadeLogicImpl.initializ > e(EntityFacadeLogicImpl.java:50) > > at > org.andromda.core.metafacade.MetafacadeFactory.internalCreateM > etafacade(MetafacadeFactory.java:292) > > at > org.andromda.core.metafacade.MetafacadeFactory.createFacadeImp > l(MetafacadeFactory.java:378) > > at > de.dpcom.bpm.metafacades.uml.TimoEntityFacadeLogic.<init>(Timo > EntityFacadeLogic.java:21) > > at > de.dpcom.bpm.metafacades.uml.TimoEntityFacadeLogicImpl.<init>( > TimoEntityFacadeLogicImpl.java:23) > > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeCo > nstructorAccessorImpl.java:39) > > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Dele > gatingConstructorAccessorImpl.java:27) > > at > java.lang.reflect.Constructor.newInstance(Constructor.java:274) > > at > org.apache.commons.beanutils.ConstructorUtils.invokeConstructo > r(ConstructorUtils.java:155) > > at > org.andromda.core.metafacade.MetafacadeFactory.internalCreateM > etafacade(MetafacadeFactory.java:260) > > at > org.andromda.core.metafacade.MetafacadeFactory.createMetafacad > es(MetafacadeFactory.java:560) > > at > org.andromda.core.metafacade.MetafacadeFactory.createMetafacad > es(MetafacadeFactory.java:579) > > at > org.andromda.metafacades.uml14.UMLModelAccessFacade.getModelEl > ements(UMLModelAccessFacade.java:146) > > at > org.andromda.core.cartridge.Cartridge.processTemplate(Cartridg > e.java:164) > > at > org.andromda.core.cartridge.Cartridge.processModelElements(Car > tridge.java:97) > > at > org.andromda.core.ModelProcessor.process(ModelProcessor.java:273) > > at > org.andromda.core.ModelProcessor.process(ModelProcessor.java:143) > > at > org.andromda.core.anttasks.AndroMDAGenTask.execute(AndroMDAGen > Task.java:247) > > at org.apache.tools.ant.Task.perform(Task.java:341) > > at > org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185) > > at > org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) > > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) > > at > org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(Mave > nGoalTag.java:79) > > at > org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction > .performAction(MavenGoalTag.java:110) > > at com.werken.werkz.Goal.fire(Goal.java:639) > > at com.werken.werkz.Goal.attain(Goal.java:575) > > at > com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193) > > at > org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(Mav > enAttainGoalTag.java:127) > > at > org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) > > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) > > at > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233) > > at > com.werken.werkz.jelly.PreGoalTag$1.firePreGoal(PreGoalTag.java:87) > > at com.werken.werkz.Goal.firePreGoalCallbacks(Goal.java:691) > > at com.werken.werkz.Goal.fire(Goal.java:616) > > at com.werken.werkz.Goal.attain(Goal.java:575) > > at > com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193) > > at > org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(Mav > enAttainGoalTag.java:127) > > at > org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) > > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) > > at > org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(Mave > nGoalTag.java:79) > > at > org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction > .performAction(MavenGoalTag.java:110) > > at com.werken.werkz.Goal.fire(Goal.java:639) > > at com.werken.werkz.Goal.attain(Goal.java:575) > > at > org.apache.maven.plugin.PluginManager.attainGoals(PluginManage > r.java:671) > > at > org.apache.maven.MavenSession.attainGoals(MavenSession.java:263) > > at > org.apache.maven.jelly.tags.maven.ReactorTag.doTag(ReactorTag. > java:368) > > at > org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) > > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) > > at > org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(Mave > nGoalTag.java:79) > > at > org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction > .performAction(MavenGoalTag.java:110) > > at com.werken.werkz.Goal.fire(Goal.java:639) > > at com.werken.werkz.Goal.attain(Goal.java:575) > > at > com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193) > > at > org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(Mav > enAttainGoalTag.java:127) > > at > org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) > > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) > > at > org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(Mave > nGoalTag.java:79) > > at > org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction > .performAction(MavenGoalTag.java:110) > > at com.werken.werkz.Goal.fire(Goal.java:639) > > at com.werken.werkz.Goal.attain(Goal.java:575) > > at > com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193) > > at > org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag.doTag(Mav > enAttainGoalTag.java:127) > > at > org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279) > > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135) > > at > org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(Mave > nGoalTag.java:79) > > at > org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction > .performAction(MavenGoalTag.java:110) > > at com.werken.werkz.Goal.fire(Goal.java:639) > > at com.werken.werkz.Goal.attain(Goal.java:575) > > at > org.apache.maven.plugin.PluginManager.attainGoals(PluginManage > r.java:671) > > at > org.apache.maven.MavenSession.attainGoals(MavenSession.java:263) > > at org.apache.maven.cli.App.doMain(App.java:488) > > at org.apache.maven.cli.App.main(App.java:1239) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess > orImpl.java:39) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth > odAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:324) > > at com.werken.forehead.Forehead.run(Forehead.java:551) > > at com.werken.forehead.Forehead.main(Forehead.java:581) > > > >I don`t understand why this error occurs... If I change the > Relation in my metafacades into a Generalization between > "MyEntityFacade" and "EntityFacade" everything runs fine! > What am I doing wrong. > > > > > I thought you said above it doesn't work with the > generalization "In my Metafacades I have a Generalization > between the metafacades "MyEntityFacade" and "EntityFacade" > (from the UMLMetafacadeModel)"..but then right above you say > it does work?: "If I change the Relation in my metafacades > into a Generalization between "MyEntityFacade" and > "EntityFacade" everything runs fine"..so what causes it to fail? > > >Thanks in advance > >Timo > > > > > > > >>-----Urspr�ngliche Nachricht----- > >>Von: [EMAIL PROTECTED] > >>[mailto:[EMAIL PROTECTED] Im > Auftrag von Chad > >>Brandon > >>Gesendet: Mittwoch, 6. April 2005 21:35 > >>An: Jim Otte > >>Cc: [EMAIL PROTECTED]; [email protected] > >>Betreff: Re: [Andromda-user] velocity template class variable api > >> > >>Take a look at the > >>andromda-all/metafacades/uml/uml14/src/META-INF/andromda-metaf > >>acades.xml. > >>In there you'll see mappings from meta model classes to metafacade > >>classes. In there you'll see default metafacades that are > applied if > >>unmapped by a stereotype, for example, you'll see this: > >> > >> <metafacade > >>class="org.andromda.metafacades.uml14.ClassifierFacadeLogicImpl"> > >> <mapping class="org.omg.uml.foundation.core.UmlClass$Impl"/> > >> </metafacade> > >> > >>So if model element with the tgl-persistable stereotype is of type > >>"org.omg.uml.foundation.core.UmlClass$Impl" then it will > automatically > >>be wrapped with an instance of > >>"org.andromda.metafacades.uml14.ClassifierFacadeLogicImpl", > >>if you added a stereotype to the mapping, like this for example: > >> > >> <metafacade > >>class="org.andromda.metafacades.uml14.EnumerationFacadeLogicImpl"> > >> <mapping > class="org.omg.uml.foundation.core.Classifier$Impl"> > >> <stereotype>Enumeration</stereotype> > >> </mapping> > >> </metafacade> > >> > >>Then it wraps the meta model element with another > metafacade (instead > >>of the default ClassifierFacade). For more information, > try readying > >>the metafacade docs, and take a look at how they're configured: > >> > >>http://galaxy.andromda.org/docs/andromda-metafacades/configu > ring.html > >> > >>Jim Otte wrote: > >> > >> > >> > >>>1 more thing- > >>>I was looking at the model I am working with and notice that > >>> > >>> > >>I have a > >> > >> > >>>custom stereotype (created in > >>>MagicDraw- and extends base "Class")- and applied to my > data classes > >>>called "TGL-Persistable". > >>>I do not actually create the TGL-Persistable class- as magic draw > >>>created the stereotype and inserted it in the xmi project. > >>>In my custom template I also reference $class and as you > pointed out > >>>this resolves to the variable in the > >>>cartridge- > >>> > >>> <template > >>> path="templates/tgl-java/TGL-Persistable.vsl" > >>> outputPattern="{0}/{1}.java" > >>> outlet="tgl-persistable" > >>> overwrite="true" > >>> required="false"> > >>> <modelElements variable="class"> > >>> <modelElement > >>>stereotype="TGL-Persistable"/> > >>> </modelElements> > >>> </template> > >>> > >>>TGL-Persistable...and it does get the right values when the > >>> > >>> > >>template is > >> > >> > >>>resolved. Is something creating the custom stereotype class > >>> > >>> > >>and having > >> > >> > >>>it extend ClassifierFacade to get those attributes??? > >>>1 of those cases where it works but not exactly certain > why- Thanks, > >>>Jim > >>> > >>> > >>>--- Chad Brandon <[EMAIL PROTECTED]> wrote: > >>> > >>> > >>> > >>> > >>> > >>>>Thats all in the links I gave you, for example, take a look at > >>>>ModelElementFacade from the first link (which almost all UML > >>>>metafacades > >>>>extend) (that has getPackageName(), etc which can be called as > >>>>"packageName" from the template). To know which variable in the > >>>>template has what, take a look at the > andromda-cartridge.xml of the > >>>>java cartridge for example, in there you'll see this: > >>>> > >>>> <template > >>>> path="templates/java/ValueObject.vsl" > >>>> outputPattern="{0}/{1}.java" > >>>> outlet="value-objects" > >>>> overwrite="true" > >>>> required="false"> > >>>> <modelElements variable="class"> > >>>> <modelElement> > >>>> <type > >>>>name="org.andromda.metafacades.uml.ValueObject"/> > >>>> </modelElement> > >>>> </modelElements> > >>>> </template> > >>>> > >>>>This is the template descriptor for generating value objects. > >>>> > >>>>Notice the <type/> element, this defines the metafacade > >>>> > >>>> > >>that will be > >> > >> > >>>>used within the template, then you can go look at the API I > >>>> > >>>> > >>gave you > >> > >> > >>>>for the ValueObject metafacades and see what features it > >>>> > >>>> > >>has (and what > >> > >> > >>>>it extends). > >>>> > >>>>Jim Otte wrote: > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>Chad, > >>>>> > >>>>>Thank you for your reply- however, after looking at > these links I > >>>>>still do not see how 1 could know > >>>>> > >>>>> > >>>>> > >>>>> > >>>>that > >>>> > >>>> > >>>> > >>>> > >>>>>in the velocity template ValueObject.vsl in > >>>>>andromda-java-cartridge-3.0M3.jar > >>>>>That you can use the variable $class.packageName or > >>>>>$attribute.type.fullyQualifiedName or > >>>>> > >>>>> > >>$associationEnd.otherEnd - they > >> > >> > >>>>>are resonable- in > >>>>> > >>>>> > >>>>> > >>>>> > >>>>fact > >>>> > >>>> > >>>> > >>>> > >>>>>I succesfully used a variable class.abstract- but > >>>>> > >>>>> > >>>>> > >>>>> > >>>>that > >>>> > >>>> > >>>> > >>>> > >>>>>was just a good guess- how can I know all the attributes off of > >>>>>'class' such as packageName, name > >>>>> > >>>>> > >>>>> > >>>>> > >>>>or > >>>> > >>>> > >>>> > >>>> > >>>>>that there is even a variable that can be resolved with the name > >>>>>"associationEnd"- is such a mapping > >>>>> > >>>>> > >>>>> > >>>>> > >>>>in a > >>>> > >>>> > >>>> > >>>> > >>>>>file- or is it in a different api? > >>>>> > >>>>>Thanks, > >>>>>Jim > >>>>>--- Chad Brandon <[EMAIL PROTECTED]> wrote: > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>Here's the source reference, unfortunately the javadoc > reference > >>>>>>seems to be missing for the generated interfaces > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>http://team.andromda.org/docs/andromda-metafacades-uml/xref/ > >>>> > >>>> > >>index.html > >> > >> > >>>> > >>>> > >>>> > >>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>You can also find the metafacade interfaces for > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>each > >>>> > >>>> > >>>> > >>>> > >>>>>>cartridge in the > >>>>>>same type of report, under the "Project Reports", for > >>>>>> > >>>>>> > >>example here > >> > >> > >>>>>>are the ones for the spring cartridge: > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>http://team.andromda.org/docs/andromda-spring-cartridge/xref > >>>> > >>>> > >>/index.html > >> > >> > >>>> > >>>> > >>>> > >>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>Jim Otte wrote: > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>>I have been using andromda for a little while now > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>and > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>>am overall impressed by it- The only thing that I > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>am > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>>still finding a little "mysterious" is the api > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>for > >>>> > >>>> > >>>> > >>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>the > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>>model class variables used in the velocity > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>templates > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>>(I am having to create a few custom templates). > >>>>>>>For example- in the templates these variables are > >>>>>>>used: > >>>>>>>class.generalization.fullyQualifiedName > >>>>>>>class.attributes > >>>>>>>attribute.type.fullyQualifiedName > >>>>>>> > >>>>>>>are all attributes off of variable Class which is > resolved to the > >>>>>>>class being generated. But where > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>are > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>>these attributes listed- is there a public api available for > >>>>>>>"class" or am I just completely > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>missing > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>>something basic? > >>>>>>>For example- when I use the StringUtils variable > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>(from > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>>commons)- I can see the class it is referring to > >>>>>>>(StringUtils) and the java api for it (at apache > commons)...but > >>>>>>>where can I find the analogous api > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>for > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>>these implicitly resolved variables (I do not see > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>them > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>>>set anywhere) > >>>>>>> > >>>>>>>Thanks, > >>>>>>>Jim > >>>>>>> > >>>>>>> > > > > > > > >------------------------------------------------------- > >SF email is sponsored by - The IT Product Guide Read honest & candid > >reviews on hundreds of IT Products from real users. > >Discover which products truly live up to the hype. Start reading now. > >http://ads.osdn.com/?ad_ide95&alloc_id396&op=click > >_______________________________________________ > >Andromda-user mailing list > >[email protected] > >https://lists.sourceforge.net/lists/listinfo/andromda-user > > > > > > > > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Andromda-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/andromda-user
