Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8076335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:14:27+00:00 2026-06-05T15:14:27+00:00

From Spring Projects Issue Tracker Beans: public class JavaBean { private NestedBean nested; }

  • 0

From Spring Projects Issue Tracker

Beans:

public class JavaBean {

    private NestedBean nested;

}

public class NestedBean {

    private String foo;    
    private List<NestedBean> list;      
    private Map<String, NestedBean> map;

}

Bind:

http://localhost:8080/mvc-showcase/convert/bean?nested.foo=bar&nested.list[0].foo=baz&nested.map[key].list[0].foo=bip

Exception:

NullValueInNestedPathException: Invalid property 'nested.map[key]' of bean class [org.springframework.samples.mvc.convert.JavaBean]: Could not determine property type for auto-growing a default value
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:14:29+00:00Added an answer on June 5, 2026 at 3:14 pm

    Use a LazyMap as follow:

    public class LazyMap<K, V> implements Map<K, V> {
    
        private Map<K, V> nestedMap;
        private Class<V> valueType;
    
        public LazyMap(Class<V> valueType) {
            nestedMap = new HashMap<K, V>();
            this.valueType = valueType;
        }
    
        @Override
        public void clear() {
            nestedMap.clear();
        }
    
        @Override
        public boolean containsKey(Object key) {
            return nestedMap.containsKey(key);
        }
    
        @Override
        public boolean containsValue(Object value) {
            return nestedMap.containsValue(value);
        }
    
        @Override
        public Set<java.util.Map.Entry<K, V>> entrySet() {
            return nestedMap.entrySet();
        }
    
        @SuppressWarnings("unchecked")
        @Override
        public V get(Object key) {
            if (!containsKey(key)) {
                try {
                    put((K) key, valueType.newInstance());
                } catch (Exception e) {
                    throw new IllegalArgumentException(e);
                }
            }
            return nestedMap.get(key);
        }
    
        @Override
        public boolean isEmpty() {
            return nestedMap.isEmpty();
        }
    
        @Override
        public Set<K> keySet() {
            return nestedMap.keySet();
        }
    
        @Override
        public V put(K key, V value) {
            return nestedMap.put(key, value);
        }
    
        @Override
        public void putAll(Map<? extends K, ? extends V> m) {
            nestedMap.putAll(m);
        }
    
        @Override
        public V remove(Object key) {
            return nestedMap.remove(key);
        }
    
        @Override
        public int size() {
            return nestedMap.size();
        }
    
        @Override
        public Collection<V> values() {
            return nestedMap.values();
        }
    
    }
    

    Bean:

    public class NestedBean {
    
        private String foo;    
        private List<NestedBean> list;      
        private Map<String, NestedBean> map = new LazyMap<String, NestedBean>(NestedBean.class);
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a project I am converting over from Spring MVC to Jersey
In my project I take a string from user and then I need to
I want to override a string from a System.ComponentModel.DataAnnotations for an ASP.NET project. Do
In my project i need to take an expression input from user as string
I'm just upgrading from Spring 3.0.6 to 3.1 and there seems to be an
After upgrading from Spring 3.0.0.M4 to 3.0.0.RC1 and Spring Security 3.0.0.M2 to 3.0.0.RC1, I've
How to clean jms queue from spring jms? Like clean command from MQ Explorer?
I have a Java program that executes from Spring Qquartz every 20 seconds. Sometimes
I recently upgraded my app from Spring 2.5.6 to Spring 3.0.0. A few days
I basically have the exact same problem as here: http://stackoverflow.com/questions/2416155/issue-in-executing-spring-web-project-in-eclipse-on-tomcat-server but the fix for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.