I got an error about spring framework (Version 4.2.3) as below.
2024-05-08 16:53:58,237 ERROR [error.jsp] (error_jsp.java:90) - Unexpected exception caught by error view org.springframework.beans.InvalidPropertyException: Invalid property 'mvnoAccessIpRange[256]' of bean class [com.sbmvnoapp.dto.MvnoProfileDTO]: Index of out of bounds in property path 'mvnoAccessIpRange[256]'; nested exception is java.lang.IndexOutOfBoundsException: Index: 256, Size: 256
On the server side, it will get data from database to private List mvnoAccessIpRange. The size is more than 258. However, after removing one record and save, it shows the above error: Index of out of bounds.
I suspect the problem in the ModelAttribute as below as the log has not shown “++++++”
@RequestMapping(value="/mvnoprofile.html", method = RequestMethod.POST, params = { "actionType" }) public String saveMvnoProfile(@ModelAttribute("mvnoProfileModel") MvnoProfileDTO mvnoProfileDTO, @RequestParam String actionType, Errors errors, Model model, HttpServletRequest request, HttpSession session) { logger.debug("++++++"); model.addAttribute("MODE", "WRITE"); System.out.println("actionType:"+actionType); System.out.println("saveMvnoProfile"); ..... .....
Is there a limit of spring framework (Version 4.2.3) when the array is more than 256 on JSP and it will be unable to pass back to server?
How to solve the limitation of 256?