[ https://issues.apache.org/jira/browse/WICKET-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-3033. ----------------------------------- Assignee: Igor Vaynberg Fix Version/s: 1.4.12 1.5-M2 Resolution: Fixed > Stack Overflow in getBeanDefinition()'s of SpringBeanLocator and > AnnotProxyFieldValueFactory > -------------------------------------------------------------------------------------------- > > Key: WICKET-3033 > URL: https://issues.apache.org/jira/browse/WICKET-3033 > Project: Wicket > Issue Type: Bug > Components: wicket-spring > Affects Versions: 1.4.10 > Reporter: Maarten van Grootel > Assignee: Igor Vaynberg > Fix For: 1.4.12, 1.5-M2 > > Attachments: getBeanBug.tar.gz, WICKET3033_getBeanDefinition.patch > > > The getBeanDefinition() in org.apache.wicket.spring.SpringBeanLocator and > org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory will > result in a Stack Overflow if a parent-context exists. > Offending code > {code} > private BeanDefinition getBeanDefinition(ConfigurableListableBeanFactory > beanFactory, > String name) > { > [....] > BeanFactory parent = beanFactory.getParentBeanFactory(); > if (parent != null && parent instanceof ConfigurableListableBeanFactory) > { > return getBeanDefinition(beanFactory, name); > } > [....] > } > {code} > As you can see it always calls the getBeanDefinition() with the same > arguments resulting in a stack overflow. That specific return statement > should call the getBeanDefinition of the parent and therefore should be: > {code} > return getBeanDefinition((ConfigurableListableBeanFactory) parent, > name); > {code} > I'll include a quick start to reproduce the error for the > AnnotProxyFieldValueFactory and a patch to solve it for both. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.