org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ru.yandex.commune.junk.stepancheg.spring.readWrite.MyDaoSupport5#0' defined in resource loaded from byte array: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same

Spring JIRA | Stepan Koltsov | 5 years ago
  1. 0

    Regression in 3.1 M2. When subclass overrides getter with narrower return type, Spring fails to set property. {code} public class ReadWritePropertyErrorMain { public static void main(String[] args) { final String contextXml = "<beans xmlns='http://www.springframework.org/schema/beans&#39;" + " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance&#39;" + " xsi:schemaLocation='" + " http://www.springframework.org/schema/beans" + " http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" + " '" + ">" + " <bean id='t' class='" + MyTemplate5.class.getName() + "'/>" + " <bean class='" + MyDaoSupport5.class.getName() + "'>" + " <property name='myTemplate4' ref='t'/>" + " </bean>" + "</beans>"; AbstractXmlApplicationContext applicationContext = new AbstractXmlApplicationContext() { @Override protected Resource[] getConfigResources() { return new Resource[] { new ByteArrayResource(contextXml.getBytes()) }; } }; applicationContext.refresh(); System.out.println("$"); } } public class MyDaoSupport4 { private MyTemplate4 myTemplate4; public void setMyTemplate4(MyTemplate4 jdbcTemplate4) { this.myTemplate4 = jdbcTemplate4; } public MyTemplate4 getMyTemplate4() { return myTemplate4; } } public class MyDaoSupport5 extends MyDaoSupport4 { @Override public MyTemplate5 getMyTemplate4() { // <-- narrow subtype is here return (MyTemplate5) super.getMyTemplate4(); } } public class MyTemplate4 { } public class MyTemplate5 extends MyTemplate4 { } {code} Error: {noformat} Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ru.yandex.commune.junk.stepancheg.spring.readWrite.MyDaoSupport5#0' defined in resource loaded from byte array: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at ru.yandex.commune.junk.stepancheg.spring.readWrite.ReadWriteProperty.main(ReadWriteProperty.java:36) Caused by: java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.core.convert.Property.resolveMethodParameter(Property.java:137) at org.springframework.core.convert.Property.<init>(Property.java:56) at org.springframework.beans.BeanWrapperImpl.property(BeanWrapperImpl.java:1174) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:497) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:490) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1371) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1330) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) ... 9 more {noformat}

    Spring JIRA | 5 years ago | Stepan Koltsov
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ru.yandex.commune.junk.stepancheg.spring.readWrite.MyDaoSupport5#0' defined in resource loaded from byte array: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same
  2. 0

    Regression in 3.1 M2. When subclass overrides getter with narrower return type, Spring fails to set property. {code} public class ReadWritePropertyErrorMain { public static void main(String[] args) { final String contextXml = "<beans xmlns='http://www.springframework.org/schema/beans&#39;" + " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance&#39;" + " xsi:schemaLocation='" + " http://www.springframework.org/schema/beans" + " http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" + " '" + ">" + " <bean id='t' class='" + MyTemplate5.class.getName() + "'/>" + " <bean class='" + MyDaoSupport5.class.getName() + "'>" + " <property name='myTemplate4' ref='t'/>" + " </bean>" + "</beans>"; AbstractXmlApplicationContext applicationContext = new AbstractXmlApplicationContext() { @Override protected Resource[] getConfigResources() { return new Resource[] { new ByteArrayResource(contextXml.getBytes()) }; } }; applicationContext.refresh(); System.out.println("$"); } } public class MyDaoSupport4 { private MyTemplate4 myTemplate4; public void setMyTemplate4(MyTemplate4 jdbcTemplate4) { this.myTemplate4 = jdbcTemplate4; } public MyTemplate4 getMyTemplate4() { return myTemplate4; } } public class MyDaoSupport5 extends MyDaoSupport4 { @Override public MyTemplate5 getMyTemplate4() { // <-- narrow subtype is here return (MyTemplate5) super.getMyTemplate4(); } } public class MyTemplate4 { } public class MyTemplate5 extends MyTemplate4 { } {code} Error: {noformat} Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ru.yandex.commune.junk.stepancheg.spring.readWrite.MyDaoSupport5#0' defined in resource loaded from byte array: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at ru.yandex.commune.junk.stepancheg.spring.readWrite.ReadWriteProperty.main(ReadWriteProperty.java:36) Caused by: java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.core.convert.Property.resolveMethodParameter(Property.java:137) at org.springframework.core.convert.Property.<init>(Property.java:56) at org.springframework.beans.BeanWrapperImpl.property(BeanWrapperImpl.java:1174) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:497) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:490) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1371) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1330) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) ... 9 more {noformat}

    Spring JIRA | 5 years ago | Stepan Koltsov
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ru.yandex.commune.junk.stepancheg.spring.readWrite.MyDaoSupport5#0' defined in resource loaded from byte array: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same
  3. 0

    Yesterday or today something changed that causes the default="true" of a check box to create an exception. If I remove it, then the page renders fine. <bean parent="AttributeField" p:propertyName="agenda.active" p:label="Active" p:defaultValue="true"> <property name="control"> <bean parent="CheckboxControl"/> </property> </bean> 2011-08-18 13:27:31,822 [http-8080-1] u:admin/d: ERROR org.kuali.rice.krad.web.bind.UifHandlerExceptionResolver - The following error was caught by the UifHandlerExceptionResolver : org.springframework.web.bind.annotation.support.HandlerMethodInvocationException: Failed to invoke handler method [public org.springframework.web.servlet.ModelAndView org.kuali.rice.krad.web.controller.MaintenanceDocumentController.start(org.kuali.rice.krad.web.form.UifFormBase,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:181) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:863) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:851) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:756) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:89) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:69) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.core.convert.Property.resolveMethodParameter(Property.java:137) at org.springframework.core.convert.Property.<init>(Property.java:56) at org.springframework.beans.BeanWrapperImpl.property(BeanWrapperImpl.java:1174) at org.springframework.beans.BeanWrapperImpl.getPropertyTypeDescriptor(BeanWrapperImpl.java:377) at org.springframework.beans.BeanWrapperImpl.createDefaultPropertyValue(BeanWrapperImpl.java:596) at org.springframework.beans.BeanWrapperImpl.setDefaultValue(BeanWrapperImpl.java:590) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:555) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:529) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:333) at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:410) at org.kuali.rice.krad.uif.util.ObjectPropertyUtils.isWritableProperty(ObjectPropertyUtils.java:98) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.populateDefaultValueForField(ViewHelperServiceImpl.java:1089) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.applyDefaultValues(ViewHelperServiceImpl.java:1035) at org.kuali.rice.krad.web.bind.UifServletRequestDataBinder.bind(UifServletRequestDataBinder.java:175) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.doBind(AnnotationMethodHandlerAdapter.java:775) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doBind(HandlerMethodInvoker.java:805) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments(HandlerMethodInvoker.java:359) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:171) ... 27 more 2011-08-18 13:27:31,837 [http-8080-1] u:admin/d: ERROR org.kuali.rice.krad.web.bind.UifHandlerExceptionResolver - Failed to invoke handler method [public org.springframework.web.servlet.ModelAndView org.kuali.rice.krad.web.controller.MaintenanceDocumentController.start(org.kuali.rice.krad.web.form.UifFormBase,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same org.springframework.web.bind.annotation.support.HandlerMethodInvocationException: Failed to invoke handler method [public org.springframework.web.servlet.ModelAndView org.kuali.rice.krad.web.controller.MaintenanceDocumentController.start(org.kuali.rice.krad.web.form.UifFormBase,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:181) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:863) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:851) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:756) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:89) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:69) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.core.convert.Property.resolveMethodParameter(Property.java:137) at org.springframework.core.convert.Property.<init>(Property.java:56) at org.springframework.beans.BeanWrapperImpl.property(BeanWrapperImpl.java:1174) at org.springframework.beans.BeanWrapperImpl.getPropertyTypeDescriptor(BeanWrapperImpl.java:377) at org.springframework.beans.BeanWrapperImpl.createDefaultPropertyValue(BeanWrapperImpl.java:596) at org.springframework.beans.BeanWrapperImpl.setDefaultValue(BeanWrapperImpl.java:590) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:555) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:529) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:333) at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:410) at org.kuali.rice.krad.uif.util.ObjectPropertyUtils.isWritableProperty(ObjectPropertyUtils.java:98) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.populateDefaultValueForField(ViewHelperServiceImpl.java:1089) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.applyDefaultValues(ViewHelperServiceImpl.java:1035) at org.kuali.rice.krad.web.bind.UifServletRequestDataBinder.bind(UifServletRequestDataBinder.java:175) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.doBind(AnnotationMethodHandlerAdapter.java:775) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doBind(HandlerMethodInvoker.java:805) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments(HandlerMethodInvoker.java:359) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:171) ... 27 more

    Kuali JIRA | 5 years ago | Claus Niesen
    org.springframework.web.bind.annotation.support.HandlerMethodInvocationException: Failed to invoke handler method [public org.springframework.web.servlet.ModelAndView org.kuali.rice.krad.web.controller.MaintenanceDocumentController.start(org.kuali.rice.krad.web.form.UifFormBase,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Full exception below can be seen when using the "Vendor Maintenance" link from the Rice Sampleapp Portal: 2011-10-05 15:54:51,104 [http-8083-13] u:admin/d: ERROR org.kuali.rice.krad.web.bind.UifHandlerExceptionResolver - Failed to invoke handler method [public org.springframework.web.servlet.ModelAndView org.kuali.rice.krad.web.controller.MaintenanceDocumentController.start(org.kuali.rice.krad.web.form.UifFormBase,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same org.springframework.web.bind.annotation.support.HandlerMethodInvocationException: Failed to invoke handler method [public org.springframework.web.servlet.ModelAndView org.kuali.rice.krad.web.controller.MaintenanceDocumentController.start(org.kuali.rice.krad.web.form.UifFormBase,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:181) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:863) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:851) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:756) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:89) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:69) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.core.convert.Property.resolveMethodParameter(Property.java:137) at org.springframework.core.convert.Property.<init>(Property.java:56) at org.springframework.beans.BeanWrapperImpl.property(BeanWrapperImpl.java:1174) at org.springframework.beans.BeanWrapperImpl.getPropertyTypeDescriptor(BeanWrapperImpl.java:377) at org.springframework.beans.BeanWrapperImpl.createDefaultPropertyValue(BeanWrapperImpl.java:596) at org.springframework.beans.BeanWrapperImpl.setDefaultValue(BeanWrapperImpl.java:590) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:555) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:529) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:333) at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:410) at org.kuali.rice.krad.uif.util.ObjectPropertyUtils.isWritableProperty(ObjectPropertyUtils.java:98) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.populateDefaultValueForField(ViewHelperServiceImpl.java:1167) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.applyDefaultValues(ViewHelperServiceImpl.java:1113) at org.kuali.rice.krad.web.bind.UifServletRequestDataBinder.bind(UifServletRequestDataBinder.java:175) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.doBind(AnnotationMethodHandlerAdapter.java:775) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doBind(HandlerMethodInvoker.java:805) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments(HandlerMethodInvoker.java:359) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:171) ... 27 more

    Kuali JIRA | 5 years ago | Bonnie Huang
    org.springframework.web.bind.annotation.support.HandlerMethodInvocationException: Failed to invoke handler method [public org.springframework.web.servlet.ModelAndView org.kuali.rice.krad.web.controller.MaintenanceDocumentController.start(org.kuali.rice.krad.web.form.UifFormBase,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same
  6. 0

    Yesterday or today something changed that causes the default="true" of a check box to create an exception. If I remove it, then the page renders fine. <bean parent="AttributeField" p:propertyName="agenda.active" p:label="Active" p:defaultValue="true"> <property name="control"> <bean parent="CheckboxControl"/> </property> </bean> 2011-08-18 13:27:31,822 [http-8080-1] u:admin/d: ERROR org.kuali.rice.krad.web.bind.UifHandlerExceptionResolver - The following error was caught by the UifHandlerExceptionResolver : org.springframework.web.bind.annotation.support.HandlerMethodInvocationException: Failed to invoke handler method [public org.springframework.web.servlet.ModelAndView org.kuali.rice.krad.web.controller.MaintenanceDocumentController.start(org.kuali.rice.krad.web.form.UifFormBase,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:181) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:863) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:851) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:756) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:89) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:69) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.core.convert.Property.resolveMethodParameter(Property.java:137) at org.springframework.core.convert.Property.<init>(Property.java:56) at org.springframework.beans.BeanWrapperImpl.property(BeanWrapperImpl.java:1174) at org.springframework.beans.BeanWrapperImpl.getPropertyTypeDescriptor(BeanWrapperImpl.java:377) at org.springframework.beans.BeanWrapperImpl.createDefaultPropertyValue(BeanWrapperImpl.java:596) at org.springframework.beans.BeanWrapperImpl.setDefaultValue(BeanWrapperImpl.java:590) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:555) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:529) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:333) at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:410) at org.kuali.rice.krad.uif.util.ObjectPropertyUtils.isWritableProperty(ObjectPropertyUtils.java:98) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.populateDefaultValueForField(ViewHelperServiceImpl.java:1089) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.applyDefaultValues(ViewHelperServiceImpl.java:1035) at org.kuali.rice.krad.web.bind.UifServletRequestDataBinder.bind(UifServletRequestDataBinder.java:175) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.doBind(AnnotationMethodHandlerAdapter.java:775) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doBind(HandlerMethodInvoker.java:805) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments(HandlerMethodInvoker.java:359) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:171) ... 27 more 2011-08-18 13:27:31,837 [http-8080-1] u:admin/d: ERROR org.kuali.rice.krad.web.bind.UifHandlerExceptionResolver - Failed to invoke handler method [public org.springframework.web.servlet.ModelAndView org.kuali.rice.krad.web.controller.MaintenanceDocumentController.start(org.kuali.rice.krad.web.form.UifFormBase,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same org.springframework.web.bind.annotation.support.HandlerMethodInvocationException: Failed to invoke handler method [public org.springframework.web.servlet.ModelAndView org.kuali.rice.krad.web.controller.MaintenanceDocumentController.start(org.kuali.rice.krad.web.form.UifFormBase,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:181) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:863) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:851) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:756) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:89) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:69) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.IllegalStateException: Read and write parameter types are not the same at org.springframework.core.convert.Property.resolveMethodParameter(Property.java:137) at org.springframework.core.convert.Property.<init>(Property.java:56) at org.springframework.beans.BeanWrapperImpl.property(BeanWrapperImpl.java:1174) at org.springframework.beans.BeanWrapperImpl.getPropertyTypeDescriptor(BeanWrapperImpl.java:377) at org.springframework.beans.BeanWrapperImpl.createDefaultPropertyValue(BeanWrapperImpl.java:596) at org.springframework.beans.BeanWrapperImpl.setDefaultValue(BeanWrapperImpl.java:590) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:555) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:529) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:333) at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:410) at org.kuali.rice.krad.uif.util.ObjectPropertyUtils.isWritableProperty(ObjectPropertyUtils.java:98) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.populateDefaultValueForField(ViewHelperServiceImpl.java:1089) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.applyDefaultValues(ViewHelperServiceImpl.java:1035) at org.kuali.rice.krad.web.bind.UifServletRequestDataBinder.bind(UifServletRequestDataBinder.java:175) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.doBind(AnnotationMethodHandlerAdapter.java:775) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doBind(HandlerMethodInvoker.java:805) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments(HandlerMethodInvoker.java:359) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:171) ... 27 more

    Kuali JIRA | 5 years ago | Claus Niesen
    org.springframework.web.bind.annotation.support.HandlerMethodInvocationException: Failed to invoke handler method [public org.springframework.web.servlet.ModelAndView org.kuali.rice.krad.web.controller.MaintenanceDocumentController.start(org.kuali.rice.krad.web.form.UifFormBase,org.springframework.validation.BindingResult,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]; nested exception is java.lang.IllegalStateException: Read and write parameter types are not the same

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Read and write parameter types are not the same

      at org.springframework.core.convert.Property.resolveMethodParameter()
    2. Spring Core
      Property.<init>
      1. org.springframework.core.convert.Property.resolveMethodParameter(Property.java:137)
      2. org.springframework.core.convert.Property.<init>(Property.java:56)
      2 frames
    3. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.BeanWrapperImpl.property(BeanWrapperImpl.java:1174)
      2. org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:497)
      3. org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:490)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1371)
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1330)
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
      7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
      8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      9. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
      10. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
      11. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
      12. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
      13. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
      13 frames
    4. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
      2 frames
    5. ru.yandex.commune
      ReadWriteProperty.main
      1. ru.yandex.commune.junk.stepancheg.spring.readWrite.ReadWriteProperty.main(ReadWriteProperty.java:36)
      1 frame