Hi Ben, This is also a known issue. If you look at Configuration you will see that setupBindings(PicoContainer) is deprecated in favor of setupBindings() which returns a map.
The reason for the api change is exactly what you are running up against, the inability to override bindings. So it is probably time to: a) ensure all configurations are using the new api b) updated that test case to use setupBindings() instead of setupBindings(PicoContainer) -Justin On 2/10/10 4:09 AM, Ben Caradoc-Davies wrote: > Justin, > > if I add an override like to xsd-gml3 GMLConfiguration.registerBindings: > > container.registerComponentImplementation(XS.ANYTYPE, > ComplexSupportXSAnyTypeBinding.class); > > I get a unit test failure (see below). Looks like the test code is > gathering all the bindings and detecting that there is a duplicate > (there is already an xs:anyType binding in XSConfiguration). > > Am I overriding this binding in the correct way? Do I need to update the > test or my override? > > Kind regards, > Ben. > > > ********* Failure ************* > > org.picocontainer.defaults.DuplicateComponentKeyRegistrationException: > Key {http://www.w3.org/2001/XMLSchema}anyType duplicated > at > org.picocontainer.defaults.DefaultPicoContainer.registerComponent(DefaultPicoContainer.java:264) > > at > org.picocontainer.defaults.DefaultPicoContainer.registerComponentImplementation(DefaultPicoContainer.java:320) > > at > org.picocontainer.defaults.DefaultPicoContainer.registerComponentImplementation(DefaultPicoContainer.java:310) > > at > org.geotools.gml3.GMLConfiguration.registerBindings(GMLConfiguration.java:203) > > at org.geotools.xml.Configuration.setupBindings(Configuration.java:433) > at > org.geotools.gml3.bindings.GMLConfigurationTest.testBindingTypes(GMLConfigurationTest.java:37) > > > *********************** > -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel