http://struts.apache.org/2.0.11.2/docs/bean-configuration.html
name must be unique for the declared type try changing the name to something unique ? Martin ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Wed, 13 Aug 2008 19:21:32 +0800 > From: [EMAIL PROTECTED] > To: user@struts.apache.org > Subject: Override java.lang.Object [PropertyAccessor] > > Hi, > > I'm working on struts2 + qi4j plugin. One of the feature that we want > to support is for struts 2 to understand qi4j property and > associations. > IIUC, I would need to register my own PropertyAccessor for all objects. > > When I tried to do this, by declaring: > <bean type="ognl.PropertyAccessor" name="java.lang.Object" > class="org.qi4j.library.struts2.internal.util.Qi4jPropertyAccessor"/> > > This error occured: > Caused by: com.opensymphony.xwork2.inject.DependencyException: > Dependency mapping for [type=ognl.PropertyAccessor, > name='java.lang.Object'] already exists. > > And if I tried to override both: > o ConfigurationManager#addContainerProvider > Make sure when container provider is an instance of > StrutsXmlConfigurationProvider, and sets > [ThrowExceptionOnDuplicateBean] property to [false]; and > o Configuration#reloadContainer and Configuration#createBootstrapContainer > Sets ContainerBuilder#setAllowDuplicates to [true] > to allow duplications, This would enable duplicate declarations for > any factory and aliases. Not just my [PropertyAccessor]. > > Is there a better way to do this? Ideally, I only want to allow > duplicate for [PropertyAccessor] declarations without creating my own > Qi4jFilterDispatcher, Configuration and ConfigurationManager. > > Regards, > Edward Yakop > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ Reveal your inner athlete and share it with friends on Windows Live. http://revealyourinnerathlete.windowslive.com?locale=en-us&ocid=TXT_TAGLM_WLYIA_whichathlete_us