org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.tacitknowledge.brand.spring.BrandAwareTilesView] to required type [java.lang.Class] for property 'viewClass'

Spring JIRA | Stephanie Blair | 1 decade ago
  1. 0

    i extended the TilesView class to overload a few methods. I'm now putting my class in as the viewClass property. Here's the snippet from the -mvc.xml file: <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="requestContextAttribute" value="requestContext"/> <property name="viewClass" ref="brandAwareTilesView"/> </bean> and here's from the logs: BEE 2006-07-27 23:27:30,304 21956 [main] ERROR ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'viewResolver' defined in ServletContext resource [/WEB-INF/spring-beekeeper-mvc.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.tacitknowledge.brand.spring.BrandAwareTilesView] to required type [java.lang.Class] for property 'viewClass'] PropertyAccessExceptionsException (1 errors) org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.tacitknowledge.brand.spring.BrandAwareTilesView] to required type [java.lang.Class] for property 'viewClass' at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:1103) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:848) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:733) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:890) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:917) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:906) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1022) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:823) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48) at com.stylehive.http.OrderedContextListenerLoader.contextInitialized(OrderedContextListenerLoader.java:85) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:589) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:471) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

    Spring JIRA | 1 decade ago | Stephanie Blair
    org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.tacitknowledge.brand.spring.BrandAwareTilesView] to required type [java.lang.Class] for property 'viewClass'
  2. 0

    i extended the TilesView class to overload a few methods. I'm now putting my class in as the viewClass property. Here's the snippet from the -mvc.xml file: <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="requestContextAttribute" value="requestContext"/> <property name="viewClass" ref="brandAwareTilesView"/> </bean> and here's from the logs: BEE 2006-07-27 23:27:30,304 21956 [main] ERROR ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'viewResolver' defined in ServletContext resource [/WEB-INF/spring-beekeeper-mvc.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.tacitknowledge.brand.spring.BrandAwareTilesView] to required type [java.lang.Class] for property 'viewClass'] PropertyAccessExceptionsException (1 errors) org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.tacitknowledge.brand.spring.BrandAwareTilesView] to required type [java.lang.Class] for property 'viewClass' at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:1103) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:848) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:733) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:890) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:917) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:906) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1022) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:823) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48) at com.stylehive.http.OrderedContextListenerLoader.contextInitialized(OrderedContextListenerLoader.java:85) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:589) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:471) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

    Spring JIRA | 1 decade ago | Stephanie Blair
    org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.tacitknowledge.brand.spring.BrandAwareTilesView] to required type [java.lang.Class] for property 'viewClass'
  3. 0

    Getting IllegalArgument exception while starting Admin through jettey server

    GitHub | 3 years ago | ecommapp123
    org.springframework.beans.TypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'boolean'; nested exception is java.lang.IllegalArgumentException: Invalid boolean value [${clearCartOnLocaleSwitch}]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error creating bean (Spring/Hibernate)

    devshed.com | 8 months ago
    org.springframework.beans.TypeMismatchException:
  6. 0

    XPlanner / Discussion / Help:Installation Error -- Please Help!

    sourceforge.net | 1 year ago
    org.springframework.beans.TypeMismatchException: Failed to convert property valu e of type [org.apache.commons.collections.map.LinkedMap] to required type [java. util.HashMap] for property 'repositories'

    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. org.springframework.beans.TypeMismatchException

      Failed to convert property value of type [com.tacitknowledge.brand.spring.BrandAwareTilesView] to required type [java.lang.Class] for property 'viewClass'

      at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary()
    2. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:1103)
      2. org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:848)
      3. org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:733)
      4. org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:890)
      5. org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:917)
      6. org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:906)
      7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1022)
      8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:823)
      9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)
      10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
      11. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
      12. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
      12 frames
    3. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
      1 frame
    4. Spring
      ContextLoaderListener.contextInitialized
      1. org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
      2. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
      3. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
      4. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
      4 frames
    5. com.stylehive.http
      OrderedContextListenerLoader.contextInitialized
      1. com.stylehive.http.OrderedContextListenerLoader.contextInitialized(OrderedContextListenerLoader.java:85)
      1 frame
    6. Glassfish Core
      Catalina.start
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
      3. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
      4. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
      5. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
      6. org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:589)
      7. org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536)
      8. org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:471)
      9. org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
      10. org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
      11. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      12. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
      13. org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
      14. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
      15. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
      16. org.apache.catalina.core.StandardService.start(StandardService.java:450)
      17. org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
      18. org.apache.catalina.startup.Catalina.start(Catalina.java:537)
      18 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    8. Glassfish Core
      Bootstrap.main
      1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
      2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      2 frames