<[EMAIL PROTECTED]> schrieb am 08.03.05 10:45:46:
>
Hello,
(I have tried this what Wouter said....to declare the "type" in the cartridge
like this:
<cartridge name="gl">
<template
sheet="templates/datencontainer.vsl"
outputPattern="{0}/{1}.java"
outlet="datencontainers"
overWrite="true">
<modelElements variable="class">
<type
name="org.andromda.cartridges.gl.metafacades.DatenContainerFacade"/>
</modelElements>
</template>
</cartridge>
But I get a parser exception that the type element is invalid and
"modelElement" is expected. It dosen't work. I work with andromda 3.0M1. Could
it be that I have to update to 3.0M3???)
Here are the contents of my files:
----andromda-cartridge.xml----------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cartridge name="gl">
<template
sheet="templates/datencontainer.vsl"
outputPattern="{0}/{1}.java"
outlet="datencontainers"
overWrite="true">
<modelElements variable="class">
<modelElement stereotype="DatenContainer"/>
</modelElements>
</template>
</cartridge>
---------andromda-metafacades.xml----------------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<metafacades namespace="gl">
<default
className="org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl" />
<metafacade
metaobjectClass="org.omg.uml.foundation.core.UmlClass$Impl"
metafacadeClass="org.andromda.cartridges.gl.metafacades.DatenContainerFacadeLogicImpl">
<stereotype>DatenContainer</stereotype>
</metafacade>
</metafacades>
--------------------metafacades-impl.properties-----------------------------------------
org.andromda.cartridges.gl.metafacades.DatenContainerFacade=org.andromda.cartridges.gl.metafacades.DatenContainerFacadeLogicImpl
--------------------------------
It doesn't find the "class" variable in my template which I have declared in
the cartridge.xml.
Thanks for help.
Sandra
> Can you paste your template here ? At least the first 20 lines or something.
> If you have an element with the <<DatenContainer>> stereotype it should work
> fine.
>
> Can you also paste the complete andromda-cartridge.xml fragment for this
> mapping ?
>
> -- Wouter
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:andromda-user-
> > [EMAIL PROTECTED] On Behalf Of Sandra Wollny
> > Sent: Tuesday, March 08, 2005 9:25 AM
> > To: [email protected]
> > Subject: [Andromda-user] Variable in the cart
> >
> > Hello,
> >
> > I' m just a beginner and I have a simple question. If I declare the
> > variable in the andromda-cartridge.xml as "class", than I have access to
> > the model elements, which have the named stereotype, in the template
> > files, isn't i`t?
> >
> > <modelElements variable="class">
> > <modelElement stereotype="DatenContainer"/>
> > </modelElements>
> >
> > My problem is that I get a reference exception if I try to use the
> > variable $class in my template definition. And I don't understand why it
> > is. I wrote an own cartridge and metafacade. And it dosn't work. I have
> > extended the UML MetaModel from andromda modeling an own class
> > "DatencontainerFacade". This class extends the ModelElementFacade class
> > and then I generated the metafacade. In the Java Code file the extension
> > is done. But I have no access to the elements.
> >
> > If anyone have a tip / evidence for me.... thanks.
> >
> > Sandra
> >
> > This is my log file:
> >
> >
> > 2005-03-02 07:00:10,842 -
> > **************************************************************
> > 2005-03-02 07:00:10,842 - Starting Jakarta Velocity v1.4
> > 2005-03-02 07:00:10,842 - RuntimeInstance initializing.
> > 2005-03-02 07:00:10,842 - Default Properties File:
> > org\apache\velocity\runtime\defaults\velocity.properties
> > 2005-03-02 07:00:10,852 - Default ResourceManager initializing. (class
> > org.apache.velocity.runtime.resource.ResourceManagerImpl)
> > 2005-03-02 07:00:10,862 - Resource Loader Instantiated:
> > org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
> > 2005-03-02 07:00:10,862 - ClasspathResourceLoader : initialization
> > starting.
> > 2005-03-02 07:00:10,862 - ClasspathResourceLoader : initialization
> > complete.
> > 2005-03-02 07:00:10,872 - Resource Loader Instantiated:
> > org.apache.velocity.runtime.resource.loader.FileResourceLoader
> > 2005-03-02 07:00:10,872 - FileResourceLoader : initialization starting.
> > 2005-03-02 07:00:10,872 - FileResourceLoader : adding path '.'
> > 2005-03-02 07:00:10,872 - FileResourceLoader : initialization complete.
> > 2005-03-02 07:00:10,882 - ResourceCache : initialized. (class
> > org.apache.velocity.runtime.resource.ResourceCacheImpl)
> > 2005-03-02 07:00:10,882 - Default ResourceManager initialization complete.
> > 2005-03-02 07:00:10,882 - Loaded System Directive:
> > org.apache.velocity.runtime.directive.Literal
> > 2005-03-02 07:00:10,892 - Loaded System Directive:
> > org.apache.velocity.runtime.directive.Macro
> > 2005-03-02 07:00:10,912 - Loaded System Directive:
> > org.apache.velocity.runtime.directive.Parse
> > 2005-03-02 07:00:10,922 - Loaded System Directive:
> > org.apache.velocity.runtime.directive.Include
> > 2005-03-02 07:00:10,922 - Loaded System Directive:
> > org.apache.velocity.runtime.directive.Foreach
> > 2005-03-02 07:00:11,043 - Created: 20 parsers.
> > 2005-03-02 07:00:11,083 - Velocimacro : initialization starting.
> > 2005-03-02 07:00:11,083 - Velocimacro : adding VMs from VM library
> > template : VM_global_library.vm
> > 2005-03-02 07:00:11,093 - ResourceManager : unable to find resource
> > 'VM_global_library.vm' in any resource loader.
> > 2005-03-02 07:00:11,093 - Velocimacro : error using VM library template
> > VM_global_library.vm :
> > org.apache.velocity.exception.ResourceNotFoundException: Unable to find
> > resource 'VM_global_library.vm'
> > 2005-03-02 07:00:11,093 - Velocimacro : VM library template macro
> > registration complete.
> > 2005-03-02 07:00:11,093 - Velocimacro : allowInline = true : VMs can be
> > defined inline in templates
> > 2005-03-02 07:00:11,093 - Velocimacro : allowInlineToOverride = false :
> > VMs defined inline may NOT replace previous VM definitions
> > 2005-03-02 07:00:11,093 - Velocimacro : allowInlineLocal = false : VMs
> > defined inline will be global in scope if allowed.
> > 2005-03-02 07:00:11,093 - Velocimacro : messages on : VM system will
> > output logging messages
> > 2005-03-02 07:00:11,093 - Velocimacro : autoload off : VM system will not
> > automatically reload global library macros
> > 2005-03-02 07:00:11,093 - Velocimacro : initialization complete.
> > 2005-03-02 07:00:11,093 - Velocity successfully started.
> > 2005-03-02 07:00:11,323 - metaobject stereotype names -->
> > '[DatenContainer]'
> > 2005-03-02 07:00:11,323 - lookupFacadeClass:
> > org.omg.uml.foundation.core.UmlClass$Impl -> class
> > org.andromda.cartridges.gl.metafacades.DatenContainerFacadeLogicImpl
> > 2005-03-02 07:00:11,333 - metaobject stereotype names -->
> > '[DatenContainer]'
> > 2005-03-02 07:00:11,333 - lookupFacadeClass:
> > org.omg.uml.foundation.core.UmlClass$Impl -> class
> > org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl
> > 2005-03-02 07:00:11,383 - metaobject stereotype names -->
> > '[DatenContainer]'
> > 2005-03-02 07:00:11,383 - lookupFacadeClass:
> > org.omg.uml.foundation.core.UmlClass$Impl -> class
> > org.andromda.cartridges.gl.metafacades.DatenContainerFacadeLogicImpl
> > 2005-03-02 07:00:11,383 - metaobject stereotype names -->
> > '[DatenContainer]'
> > 2005-03-02 07:00:11,383 - lookupFacadeClass:
> > org.omg.uml.foundation.core.UmlClass$Impl -> class
> > org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl
> > 2005-03-02 07:00:11,383 - metaobject stereotype names -->
> > '[DatenContainer]'
> > 2005-03-02 07:00:11,383 - lookupFacadeClass:
> > org.omg.uml.foundation.core.UmlClass$Impl -> class
> > org.andromda.cartridges.gl.metafacades.DatenContainerFacadeLogicImpl
> > 2005-03-02 07:00:11,383 - metaobject stereotype names -->
> > '[DatenContainer]'
> > 2005-03-02 07:00:11,383 - lookupFacadeClass:
> > org.omg.uml.foundation.core.UmlClass$Impl -> class
> > org.andromda.metafacades.uml14.ModelElementFacadeLogicImpl
> > 2005-03-02 07:00:11,383 - performing processTemplate with templateFile
> > 'templates/datencontainer.vsl' and output ''
> > 2005-03-02 07:00:11,453 - ResourceManager : found
> > templates/datencontainer.vsl with loader
> > org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
> > 2005-03-02 07:00:11,483 - RHS of #set statement is null. Context will not
> > be modified. templates/datencontainer.vsl [line 5, column 1]
> > 2005-03-02 07:00:11,483 -
> > org.apache.velocity.runtime.exception.ReferenceException: reference :
> > template = templates/datencontainer.vsl [line 6,column 9] : $packagename
> > is not a valid reference.
> > 2005-03-02 07:00:11,483 -
> > org.apache.velocity.runtime.exception.ReferenceException: reference :
> > template = templates/datencontainer.vsl [line 9,column 1] :
> > $class.getDocumentation(" * ") is not a valid reference.
> > 2005-03-02 07:00:11,483 -
> > org.apache.velocity.runtime.exception.ReferenceException: reference :
> > template = templates/datencontainer.vsl [line 13,column 14] :
> > ${class.getName()} is not a valid reference.
> > 2005-03-02 07:00:11,483 -
> > org.apache.velocity.runtime.exception.ReferenceException: reference :
> > template = templates/datencontainer.vsl [line 15,column 1] :
> > $class.fullyQualifiedName is not a valid reference.
> > 2005-03-02 07:00:11,483 -
> > org.apache.velocity.runtime.exception.ReferenceException: reference :
> > template = templates/datencontainer.vsl [line 16,column 1] :
> > $class.getName() is not a valid reference.
> > 2005-03-02 07:00:11,483 -
> > org.apache.velocity.runtime.exception.ReferenceException: reference :
> > template = templates/datencontainer.vsl [line 17,column 1] :
> > $class.getFullyQualifiedName() is not a valid reference.
> > 2005-03-02 07:00:11,483 -
> > org.apache.velocity.runtime.exception.ReferenceException: reference :
> > template = templates/datencontainer.vsl [line 28,column 8] :
> > $class.getName() is not a valid reference.
> > ______________________________________________________________
> > Verschicken Sie romantische, coole und witzige Bilder per SMS!
> > Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
> >
> >
> >
> > -------------------------------------------------------
> > 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_id=6595&alloc_id=14396&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_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Andromda-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/andromda-user
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
-------------------------------------------------------
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_id=6595&alloc_id=14396&op=click
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user