Announcement Announcement Module
Collapse
No announcement yet.
util:map throwing BeanDefinitionParser error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • util:map throwing BeanDefinitionParser error

    Hi all,
    i want to implement double hashing in my code
    for example.
    In the first map Countrycode is the key
    key Value
    UK Ukdomains
    DE Germandomains

    and then
    in the second map city code is the Key

    id of this bean will be Ukdomains
    Key Value
    Lon somevalue
    Man somevalue


    this is wat i tried

    Code:
     <property name="splitDomains"
        	<util:map id="DE" map-class="java.util.HashMap">
    			<entry key="FRA" value="COLT-AM-DE001" />
    			<entry key="BHX" value="COLT-AM-DE002" />
              </util:map>
    	</property>
    but im getting BeanDefinition Parder error on map



    Any help is much appreciated.



    Thanks
    Last edited by pvpkiran; Jan 27th, 2012, 10:19 AM.

  • #2
    You would need to post your entire <bean> tag. Because if you have <property> out on its own, that isn't correct and would lead to an error. Also, you have <util:map> inside a <property> tag, therefore making it an inner bean, which is fine, but an inner bean doesn't need an "id", because it is similar to an inner class where its identity is based on the outside bean/class, so it would never be given an id, or that you could get that map out by its id, or reference it by its id elsewhere. So inner beans don't have ids. Which also might cause an error, but I have never tried to give an inner bean an id, so I don't know what it would result in.

    Mark

    Comment


    • #3
      Hi,
      thanks for the reply.
      Can u pls let me know how to implement double hashing or Hashmap in spring

      Thanks

      Comment

      Working...
      X