Hi Raf,

Yeah sure send your cartridge and project again and
I'll take a look (I think I forgot to look last
time...sorry about that!..I'll make sure I get back to
you this time.)...by the way which version of andromda
are you using?  

Chad

--- Raf Haesen <[EMAIL PROTECTED]> wrote:

> 
> Hi Chad
> 
> I mailed you a few weeks ago concerning the anoying
> class-cast-exception 
> problem...
> I managed to "solve" the problem by adding these
> lines to 
> andromda-metafacades.xml:
> 
>     <metafacade
>        
>
metaobjectClass="org.omg.uml.foundation.core.Attribute$Impl"
>         
>
metafacadeClass="org.andromda.metafacades.uml14.EntityAttributeFacadeLogicImpl">
>         <!--
>
<context>org.andromda.metafacades.uml.EntityFacade</context>
> 
> -->
>         <property reference="sqlMappingsUri"/>
>         <property reference="jdbcMappingsUri"/>
>     </metafacade>
> 
> This is an exact copy of the mapping defined in
> metafacade-mapping; this 
> "accidently" solved
> the problem but I don't understand why...:-s
> 
> And after extending the cartridge to work with
> finite state machines, I get 
> the same problem:
> I simply want to extend the StateFacade with my own
> MerodeStateFacade and I 
> want to map
> a CompositeState to that MerodeStateFacade (I want
> to use a CompositeState 
> to model the state of an
> object). I added these lines in the mappings-file:
> 
>     <metafacade
>         
>
metaobjectClass="org.omg.uml.behavioralelements.statemachines.CompositeState$Impl"
> 
>         
>
metafacadeClass="org.andromda.cartridges.merode.metafacades.MerodeStateFacadeLogicImpl">
>     </metafacade>
> 
> If I ask for the activitygraph in a template, like 
> $class.activityGraph.name, I get a
> ClassCastException
> again:
> 
> 14:32:08,538 ERROR [DefaultAndroMDACartridge] Error
> performing 
> DefaultAndroMDACartridge.processWithTemplate with
> template 
> 'templates/MerodeSubState.vsl', template context 
>
'[EMAIL PROTECTED],
> 
>
[EMAIL PROTECTED]'
> and cartridge 
> 'merode'
>
org.apache.velocity.exception.MethodInvocationException:
> Invocation of 
> method 'getActivityGraph' in  class 
>
org.andromda.cartridges.merode.metafacades.MerodeStateFacadeLogicImpl
> threw 
> exception class java.lang.ClassCastException : null
>         at 
>
org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:193)
>         at 
>
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)
>         at 
>
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220)
>         at 
>
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230)
>         at
>
org.apache.velocity.Template.merge(Template.java:256)
> 
> Could you please have a look a this? I want to send
> my cartridge and a 
> sample project again if
> necessary. Thanks in advance!
> 
> Raf
> 
> 
> 
> 
> >From: "Chad Brandon" <[EMAIL PROTECTED]>
> >To: "Raf Haesen" 
>
><[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
> >Subject: Re: [Andromda-devel] ClassCastException in
> own cartridge
> >Date: Thu, 8 Jul 2004 20:06:02 -0400
> >
> >Hi Raf, see comments below:
> >----- Original Message -----
> >From: "Raf Haesen" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Thursday, July 08, 2004 4:27 PM
> >Subject: Re: [Andromda-devel] ClassCastException in
> own cartridge
> >
> >
> > > Hello Chad
> > >
> > > Thanks for your reply! I tried to construct the
> mapping file, although I
> > > don't understand it
> > > completely: is a stereotype node required? and
> what does a context node
> >mean
> > > exactly?
> >
> >Nope, the stereotype is not required, if you don't
> have a stereotype
> >defined, then your mapping will be applied for all
> instances of your meta
> >model c (i.e. the metaobjectClass attribute), if
> you have the stereotype
> >defined, then the mapping will only be applied to
> the meta model element
> >having the stereotype and the meta model element. 
> For info about the
> >context, see the descriptor:
>
>http://team.andromda.org/docs/andromda-metafacades/descriptor-schema.html
> >
> > > Below is my andromda-metafacades.xml; can you
> please check if it 
> >correct?
> >
> >Yes, looks fine to me, are you still getting the
> class cast?  If you'd like
> >you can send me your cartridge project and I'll
> take a look.
> >
> > > Thanks!
> > >
> > >
> > > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > >
> > > <!-- contains the merode cartridge metafacade
> mappings -->
> > > <metafacades namespace="merode">
> > >     <metafacade
> > >        
>
metaobjectClass="org.omg.uml.foundation.core.Operation$Impl"
> > >
> > >
>
>metafacadeClass="org.andromda.cartridges.merode.metafacades.MerodeMethodFaca
> >deLogicImpl">
> > >         <!--
> <stereotype>FinderMethod</stereotype> -->
> > >     </metafacade>
> > >
> > >     <metafacade
> > >        
>
metaobjectClass="org.omg.uml.foundation.core.UmlClass$Impl"
> > >
> > >
>
>metafacadeClass="org.andromda.cartridges.merode.metafacades.MerodeEventHandl
> >erFacadeLogicImpl">
> > >         <stereotype>Service</stereotype>
> > >     </metafacade>
> > >
> > >     <metafacade
> > >        
>
metaobjectClass="org.omg.uml.foundation.core.Interface$Impl"
> > >
> > >
>
>metafacadeClass="org.andromda.cartridges.merode.metafacades.MerodeEventHandl
> >erFacadeLogicImpl">
> > >         <stereotype>Service</stereotype>
> > >     </metafacade>
> > >
> > >     <metafacade
> > >        
>
metaobjectClass="org.omg.uml.foundation.core.UmlClass$Impl"
> > >
> > >
>
>metafacadeClass="org.andromda.cartridges.merode.metafacades.MerodeObjectType
> >FacadeLogicImpl">
> > >         <stereotype>Entity</stereotype>
> > >         <property reference="maxSqlNameLength"/>
> > >     </metafacade>
> > >
> > >     <metafacade
> > >        
>
metaobjectClass="org.omg.uml.foundation.core.Interface$Impl"
> > >
> > >
>
>metafacadeClass="org.andromda.cartridges.merode.metafacades.MerodeObjectType
> >FacadeLogicImpl">
> > >         <stereotype>Entity</stereotype>
> > >         <property reference="maxSqlNameLength"/>
> > >     </metafacade>
> > >
> > >     <metafacade
> > >         
>
>metaobjectClass="org.omg.uml.foundation.core.AssociationEnd$Impl"
> > >
> > >
>
>metafacadeClass="org.andromda.cartridges.merode.metafacades.MerodeExistenceD
> >ependencyEndFacadeLogicImpl">
> > >
> > >
>
><context>org.andromda.cartridges.merode.metafacades.MerodeObjectTypeFacade</
> >context>
> > >         <property reference="foreignKeySuffix"/>
> > >     </metafacade>
> > >
> > > </metafacades>
> > >
> > >
> > > >From: Chad Brandon <[EMAIL PROTECTED]>
> > > >To: Raf Haesen <[EMAIL PROTECTED]>,
> > > >[EMAIL PROTECTED]
> > > >Subject: Re: [Andromda-devel]
> ClassCastException in own cartridge
> > > >Date: Thu, 8 Jul 2004 08:16:14 -0700 (PDT)
> > > >
> > > >Hi Raf,
> > > >
> > > >You'll need to make sure you're mapping your
> new
> > > >metafacade to the meta model element(s) by
> using the
> > > >andromda-metafacades.xml.  Do you have those
> mapped?
> > > >Take a look at the
> > > 
> >
>
>andromda-all/metafacades/uml/uml14/src/META-INF/andromda-metafacades.xml
> > > >to see what I mean.
> > > >
> > > >Chad
> > > >
> > > >--- Raf Haesen <[EMAIL PROTECTED]> wrote:
> > > > > Hi everybody
> > > > >
> > > > > I'm developing my own cartridge (hope I can
> ask my
> > > > > question here) called
> > > > > 'merode'.
> > > > > One of the new metafacades
> "MerodeObjectTypeFacade"
> > > > > inherits from
> > > > > "EntityFacade",
> > > > > with one new method "getMasters():
> Collection". If I
> > > > > try the cartridge on a
> > > > > simple example
> > > > > I get the following exception:
> > > > >
> > > > > 16:51:25,468 INFO  [merode] Output:
> > > > >
> > >
> >
>
>'file:/home/phonzie/andromda3/cvs/M1/andromda-all/samples/merode-test/mda/.
>
>./merode/ejb/src/java/org/merode/testapp/datalayer/LoanImpl.java'
> > > > > 16:51:25,536 ERROR
> [DefaultAndroMDACartridge] Error
> > > > > performing
> > > > > DefaultAndroMDACartridge.processWithTemplate
> with
> > > > > template
> > > > > 'templates/MerodeEntityFactory.vsl',
> template
> > > > > context
> > > > >
> > >
> >
>
>'{class=org.andromda.cartridges.merode.metafacades.MerodeObjectTypeFacadeLo
> >[EMAIL PROTECTED],
> > > > >
> > > > >
> > >
>
>[EMAIL PROTECTED]'
> > > > > and cartridge
> > > > > 'merode'
> > > > >
> > >
>
>org.apache.velocity.exception.MethodInvocationException:
> > > > > Invocation of
> > > > > method 'getAttributesAsList' in  class
> > > > >
> > >
> >
>
>org.andromda.cartridges.merode.metafacades.MerodeObjectTypeFacadeLogicImpl
> > > > >
> > > > > threw exception class
> java.lang.ClassCastException :
> > > > > null
> > > > >         at
> > > > >
> > >
> >
>
>org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:24
> >6)
> > > > >         at
> > > > >
> > >
> >
>
>org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.j
> >ava:175)
> > > > >         at
> > > > >
> > >
> >
>
>org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.ja
> >va:220)
> > > > >         at
> > > > >
> > > 
> >
>
>org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55)
> > > > >         at
> > > > >
> > >
> >
>
>org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatemen
> >t.java:70)
> > > > >         at
> > > > >
> > >
> >
>
>org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:2
> >30)
> > > > >         at
> > > > >
> > >
>
>org.apache.velocity.Template.merge(Template.java:256)
> > > > > [...]
> > > > >
> > > > > I have no idea what causes this error; can
> you help
> > > > > me please?
> > > > > Thanks
> > > > > Raf
> > > > >
> > > > >
> > >
>
>_________________________________________________________________
> > > > > Do you want to buy a new computer? Have a
> look.
> > > > > http://www.msn.be/shopping/dell_bis/
> > > > >
> > > > >
> > > > >
> > > > >
> > >
>
>-------------------------------------------------------
> > > > > This SF.Net email sponsored by Black Hat
> Briefings &
> > > > > Training.
> > > > > Attend Black Hat Briefings & Training, Las
> Vegas
> > > > > July 24-29 -
> > > > > digital self defense, top technical experts,
> no
> > > > > vendor pitches,
> > > > > unmatched networking opportunities. Visit
> > > > > www.blackhat.com
> > > > >
> _______________________________________________
> > > > > Andromda-devel mailing list
> > > > > [EMAIL PROTECTED]
> > > > >
> > >
>
>https://lists.sourceforge.net/lists/listinfo/andromda-devel
> > > > >
> > > >
> > > >
> > > >
> > >
>
>-------------------------------------------------------
> > > >This SF.Net email sponsored by Black Hat
> Briefings & Training.
> > > >Attend Black Hat Briefings & Training, Las
> Vegas July 24-29 -
> > > >digital self defense, top technical experts, no
> vendor pitches,
> > > >unmatched networking opportunities. Visit
> www.blackhat.com
> > > >_______________________________________________
> > > >Andromda-devel mailing list
> > > >[EMAIL PROTECTED]
> > >
>
>https://lists.sourceforge.net/lists/listinfo/andromda-devel
> > >
> > >
>
_________________________________________________________________
> > > Personalize your MSN Messenger with your own
> Weemee!
> > > http://entertainment.msn.be/weemee/
> > >
> > >
> > >
> > >
>
-------------------------------------------------------
> > > This SF.Net email sponsored by Black Hat
> Briefings & Training.
> > > Attend Black Hat Briefings & Training, Las Vegas
> July 24-29 -
> > > digital self defense, top technical experts, no
> vendor pitches,
> > > unmatched networking opportunities. Visit
> www.blackhat.com
> > > _______________________________________________
> > > Andromda-devel mailing list
> > > [EMAIL PROTECTED]
> > >
>
https://lists.sourceforge.net/lists/listinfo/andromda-devel
> >
> >
> >
> >
>
>-------------------------------------------------------
> >This SF.Net email sponsored by Black Hat Briefings
> & Training.
> >Attend Black Hat Briefings & Training, Las Vegas
> July 24-29 -
> >digital self defense, top technical experts, no
> vendor pitches,
> >unmatched networking opportunities. Visit
> www.blackhat.com
> >_______________________________________________
> >Andromda-devel mailing list
> >[EMAIL PROTECTED]
>
>https://lists.sourceforge.net/lists/listinfo/andromda-devel
> 
>
_________________________________________________________________
> MSN Search: fast, clear, easy http://search.msn.be
> 
> 



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to