please note that you don't need to change the content of the cartridge jar .. you could more easily override the template by using the 'mergeLocation' namespace property, documentation with an example can be found here:
http://team.andromda.org/docs/andromda-cartridges/index.html#mergeLocation -- Wouter > Hi donkoder: > > I'm using AndroMDA-3.0-RC1-SNAPSHOT too and I received the same error. > > I fixed the error (sorry about my ugly solution): > > 1.- I "unzip" the file andromda-ejb-cartridge-3.0-RC1-SNAPSHOT.jar in > the andromda lib folder. > > 2.- I changed in the EntityBean.vsl file the lines: > ---------------------------------------------------------------------- > lines 701 - 705 > #foreach ($attr in $reference.getAttributes(true)) > #if ($entity.isAttributePresent($attr.name) || > $entity.isOperationPresent($attr.getterName)) > valueObject.${attr.setterName}(${attr.getterName}()); > #end > #end > > for: > ------------ > #foreach ($attr in $reference.attributes) > #if ($entity.isAttributePresent($attr.name) || > $entity.isOperationPresent($attr.getterName)) > #foreach ($entity_attr in $entity.attributes) > #if ($entity_attr.name == $attr.name) > valueObject.${attr.setterName}(${entity_attr.getterName}()); > #end > #end > #end > #end > > 3.- Afterwards, I packed again the cartridge and rebuild the project. > > > Best Regards > ericfle > > > ---------------------------------------------------------------------------- > Date: Wed, 9 Feb 2005 22:08:26 +0100 (CET) > From: Don Code <[EMAIL PROTECTED]> > To: andromda-user@lists.sourceforge.net > Subject: [Andromda-user] ERROR in template EntityBean.vsl generating > accessor for boolean property > > Hi, > > I am using AndroMDA-3.0-RC1-SNAPSHOT and I have a > ValueRef to a ValueObject wich have a boolean > attribute. The generated getter for the boolear is > prefixed with "is" as you already know, but... > > From EntityBean.vsl line 693-707 > > // ---------------- accessor methods for bean > references --------------- > #foreach ($valueRef in $entity.valueDependencies) > #set ($reference = $valueRef.targetElement) > /** > * @ejb.interface-method > */ > public ${reference.fullyQualifiedName} > get${reference.name}() { > ${reference.fullyQualifiedName} valueObject = > new ${reference.fullyQualifiedName}(); > #foreach ($attr in $reference.getAttributes(true)) > #if ($entity.isAttributePresent($attr.name) || > $entity.isOperationPresent($attr.getterName)) > > valueObject.${attr.setterName}(${attr.getterName}()); > #end > #end > return valueObject; > } > > valueObject.${attr.setterName}(${attr.getterName}()); > is generating the getter name from the ValueObject > ("is") instead of the right getterName for the entity > which must be "get" > > I'm wrong about that observation? > > The other reference lines are 38-53 in the source file > AttributeFacadeLogicImpl.java > > /** > * @see > org.andromda.metafacades.uml.AttributeFacade#getGetterName() > */ > public java.lang.String handleGetGetterName() > { > String prefix = null; > if (getType() != null) > { > prefix = UMLMetafacadeUtils.isType( > getType(), > UMLProfile.BOOLEAN_TYPE_NAME) ? "is" : > "get"; > } > > return StringUtils.trimToEmpty(prefix) > + StringUtils.capitalize(this.getName()); > } > > Why is the reason to have a diference with the boolean > attributes? > > Sorry about my bad english. > > Regards, > Donko > ------------------------------------------------------- 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 Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user