Marcin, I do not know if this will solve your problem but you might try changing the line:
> #set($raisedSignals = $contextRaisedSignal.getRaisedSignal($op)) with #set($raisedSignals = $contextRaisedSignal.getRaisedSignal($op.id)) > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > Marcin Chałotowski > Sent: Monday, July 21, 2003 10:11 AM > To: [EMAIL PROTECTED] > Subject: [Andromda-user] getRaisedSignal() throws ClassCastException. > > > Hi, > > I want to extend the framework for the project i am working on, I > have abiut > 4 or 5 new features i want to implement. First of all it is not > suitable for > my project to throw only one exception per Bean (all its > bussiness methods). > So i tried to use the information provided in class diagram about > exceptions > thrown by the methods. > > It looked very easy to do, in EntityBean.vsl I changed section > for bussiness > methods to > > #foreach ( $op in $class.operations) > #if ($transform.getStereotype($op.id) != "FinderMethod") > > (...) > > #set($contextRaisedSignal = > $model.getCommonBehavior().getAContextRaisedSignal()) > #set($raisedSignals = $contextRaisedSignal.getRaisedSignal($op)) > #foreach($ex in $raisedSignals) > $ex.name > (...) > #end > (...) > > But unfortunately when generating the source code velocity throws an > exception: > Caused by: org.apache.velocity.exception.MethodInvocationException: > Invocation of method 'getRaisedSignal' in class > org.omg.uml.behavioralelements.commonbehavior.AContextRaisedSignal$Impl > threw exception class java.lang.ClassCastException : $Proxy6 > > > As i checked the code $Proxy6 is the right class for getRaisedSignal > because: > - proxy for org.andromda.core.simpleuml.POperation class which (Proxy) > implements two interfaces org.omg.uml.foundation.core.Operation and > org.andromda.core.simpleuml.UMLOperation, > - org.omg.uml.foundation.core.Operation extends > org.omg.uml.foundation.core.BeahavioralFeature which is the right argument > for 'getRaisedSignal' method. > The purpose of writing proxy class seems to be extending java > representation > of the UML diagrams (Operation object). > > I spent two days for checking what is wrong but have no idea what it could > be. For me it looks like something wrong with classloaders. Of course I am > not sure of these - thats why I am asking you for help. > > Anybody can help me with this issue? > > Regards, > > -- > Marcin > > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > _______________________________________________ > Andromda-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/andromda-user ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ Andromda-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-user