Well, We don't have Picocontainer bundled into Xwork / WW2 anymore.... It was there for a brief time as an experiment, and some people are talking about creating some optional libs that work on top of WW2 and Xwork that this could live in.
To answer your question, I think the problem is your components.xml: DefaultUser does not implement UserAware. The semantics for IoC with PicoContainer are different from the IoC documented for Xwork. In Pico, you register an implementation for a class or interface contract that it supplies. I'm CC'ing the list, and maybe Matt Ho, who did the PicoContainer impl for Xwork, can answer better.... Jason > -----Original Message----- > From: Alexandru Roman [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 31, 2003 8:30 AM > Subject: Mike, I recently attended the server side symposium > and have asmall question about ww2. > > > Mike, I recently attended the server side symposium and have > a small question about ww2. > > I can't seem to get IOC to work properly, and just want to > make sure I'm not missing anything: > > I'm deploying as a web app to tomcat 4.1. > > Here is what I'm getting in the tomcat log: > > picocontainer.defaults.AssignabilityRegistrationException: > The type:org.hhcc.webwork.UserAware was not assignable from > the class org.hhcc.webwork.DefaultUser > at > picocontainer.defaults.DefaultPicoContainer.checkTypeCompatibility(De > faultPicoContainer.java:239) > > Here is what I have: > > UserAware { setUser(User _user) { } }..... > User > DefaultUser implements User > TestAction implements UserAware > > components.xml: > > <component> > <scope>session</scope> > <class>org.hhcc.webwork.DefaultUser</class> > <enabler>org.hhcc.webwork.UserAware</enabler> > </component> > > xworks.xml: > > <action name="TestAction" class="org.hhcc.webwork.TestAction"> > <result name="success" type="velocity"> > <param name="location">/success.vm</param> > </result> > <interceptor-ref name="component"/> > </action> > > From all the documentation I've read that seems to be all I need. > > thanks, > > Alex. > ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork