Class loaders can be voodoo black magic. I'd need to know a bit more about you environment (JDK, app server, servlet container, etc.) to even hazard a guess.
Currently, when the DataSqueezer decodes your object, it uses the same ClassLoader that loaded tapestry.jar framework, rather than the ClassLoader that loads your WAR. This will be corrected shortly (I need to add a bug and fix it before rc-1). ----- Original Message ----- From: "doug" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 11, 2002 4:54 PM Subject: Re: [Tapestry-developer] cycle.getServiceParameters() andclassLoaders > > Thank you thank you thank you. I was up all last night trying to figure > this out. I still have no idea why moving the jar file helps (is there an > easy explanation?) but I'm happy to have it working. > > > > There's still a class loading wrinkle to work out of the > > DataSqueezer class. > > > > Try moving net.sf.tapestry-x-x.jar off the classpath and > > into WEB-INF/libs of your WAR. That should clear up > > classpath problems. > > > > > > -- > > [EMAIL PROTECTED] > > > > http://tapestry.sf.net > >> > >> I'm trying to get an Object out in a DirectLink handler and getting a > >> ClassCastException when I try to cast the Object I get back from > >> cycle.getServiceParameters(). The Object was put in by a DirectLink > >> "properties" binding. > >> > >> The class name of parameters[0] matches (I've printed it out) so I can only > >> assume that there are two different class loaders at work here each with > >> their own version of the Shift class. How am I supposed to get my object > >> back? > >> > >> > >> public void takeDay(IRequestCycle cycle) > >> { > >> Object[] parameters = cycle.getServiceParameters(); > >> visit._chosenShift = (Shift) parameters[0]; <-- ClassCastException > >> } > >> > >> <component id="linkTakeDay" type="DirectLink"> > >> <binding name="listener" expression="listeners.takeDay"/> > >> <binding name="parameters" expression="week.day.shift"/> > >> <static-binding name="stateful">false</static-binding> > >> </component> > >> > >> > >> This is with Tapestry-2.2-beta-1. > >> > >> -- doug > >> Sometimes your mind can be so open that your brain falls out. > >> > >> > >> > >> ------------------------------------------------------- > >> In remembrance > >> www.osdn.com/911/ > >> _______________________________________________ > >> Tapestry-developer mailing list > >> [EMAIL PROTECTED] > >> https://lists.sourceforge.net/lists/listinfo/tapestry-developer > > > > -- doug > Never put off until tomorrow what you can put off until the day after > tomorrow. > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Tapestry-developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/tapestry-developer
