org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.util.Date]

Spring JIRA | Dallas Hopewell | 1 decade ago
  1. 0

    I want to configure a <map> element in my applicationContext.xml where the entry values have to be converted to a specific type <bean name="map" class="org.springframework.beans.factory.config.MapFactoryBean"> <property name="sourceMap"> <map> <entry key="myDate"> <value type="java.util.Date">2005-01-01</value> </entry> </map> </property> </bean> I have declared a CustomDateEditor for the java.util.Date type in the application context via the CustomEditorConfigurer. However, when the application context is loaded I get the following exception: - Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'map' defined in class path resource [applicationContext.xml]: Error converting typed String value for sourceMap[myDate]; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.util.Date] org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.util.Date] at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:1040) at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:917) at org.springframework.beans.factory.support.AbstractBeanFactory.doTypeConversionIfNecessary(AbstractBeanFactory.java:601) at org.springframework.beans.factory.support.AbstractBeanFactory.doTypeConversionIfNecessary(AbstractBeanFactory.java:581) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:123) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:225) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:891) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:707) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:316) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:271) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:310) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:80) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:56)[/code] Spring is only applying the default property editors when converting the "TypedStringValue". e.g. line 123 of BeanDefinitionValueResolver.java invokes the 2 parameter version of AbstractBeanFactory.doTypeConversionIfNecessary, which creates a new BeanWrapperImpl but does not register the customEditors previously setup in the bean factory.

    Spring JIRA | 1 decade ago | Dallas Hopewell
    org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.util.Date]
  2. 0

    I want to configure a <map> element in my applicationContext.xml where the entry values have to be converted to a specific type <bean name="map" class="org.springframework.beans.factory.config.MapFactoryBean"> <property name="sourceMap"> <map> <entry key="myDate"> <value type="java.util.Date">2005-01-01</value> </entry> </map> </property> </bean> I have declared a CustomDateEditor for the java.util.Date type in the application context via the CustomEditorConfigurer. However, when the application context is loaded I get the following exception: - Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'map' defined in class path resource [applicationContext.xml]: Error converting typed String value for sourceMap[myDate]; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.util.Date] org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.util.Date] at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:1040) at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:917) at org.springframework.beans.factory.support.AbstractBeanFactory.doTypeConversionIfNecessary(AbstractBeanFactory.java:601) at org.springframework.beans.factory.support.AbstractBeanFactory.doTypeConversionIfNecessary(AbstractBeanFactory.java:581) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:123) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:225) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:891) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:707) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:316) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:271) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:310) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:80) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:56)[/code] Spring is only applying the default property editors when converting the "TypedStringValue". e.g. line 123 of BeanDefinitionValueResolver.java invokes the 2 parameter version of AbstractBeanFactory.doTypeConversionIfNecessary, which creates a new BeanWrapperImpl but does not register the customEditors previously setup in the bean factory.

    Spring JIRA | 1 decade ago | Dallas Hopewell
    org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [java.util.Date]
  3. 0

    An exception is thrown when injecting a SchedulerFactoryBean: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean] for property 'schedulerFactoryBean' -------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="schedulerFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"/> <bean id="test" class="test.SchedulerTest"> <property name="schedulerFactoryBean"><ref local="schedulerFactoryBean"/></property> </bean> </beans> -------------------------------------------------------------------- package test; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.scheduling.quartz.SchedulerFactoryBean; public class SchedulerTest { private SchedulerFactoryBean schedulerFactoryBean; public void setSchedulerFactoryBean(SchedulerFactoryBean schedulerFactoryBean) { this.schedulerFactoryBean = schedulerFactoryBean; } public static void main(String[] args) { new ClassPathXmlApplicationContext("context.xml"); } } -------------------------------------------------------------------- 11-May-2005 19:11:48 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [context.xml] 11-May-2005 19:11:49 org.springframework.context.support.AbstractRefreshableApplicationContext refreshBeanFactory INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=3043939]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [schedulerFactoryBean,test]; root of BeanFactory hierarchy 11-May-2005 19:11:49 org.springframework.context.support.AbstractApplicationContext refresh INFO: 2 beans defined in application context [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=3043939] 11-May-2005 19:11:49 org.springframework.core.CollectionFactory <clinit> INFO: JDK 1.4+ collections available 11-May-2005 19:11:49 org.springframework.context.support.AbstractApplicationContext initMessageSource INFO: Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@19f953d] 11-May-2005 19:11:49 org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@1eed786] 11-May-2005 19:11:49 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [schedulerFactoryBean,test]; root of BeanFactory hierarchy] 11-May-2005 19:11:49 org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'schedulerFactoryBean' 11-May-2005 19:11:49 org.quartz.simpl.SimpleThreadPool initialize INFO: Job execution threads will use class loader of thread: main 11-May-2005 19:11:49 org.quartz.simpl.RAMJobStore initialize INFO: RAMJobStore initialized. 11-May-2005 19:11:49 org.quartz.impl.StdSchedulerFactory instantiate INFO: Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 11-May-2005 19:11:49 org.quartz.impl.StdSchedulerFactory instantiate INFO: Quartz scheduler version: 1.4.5 11-May-2005 19:11:49 org.springframework.scheduling.quartz.SchedulerFactoryBean startScheduler INFO: Starting Quartz scheduler now 11-May-2005 19:11:49 org.quartz.core.QuartzScheduler start INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started. 11-May-2005 19:11:49 org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'test' 11-May-2005 19:11:49 org.springframework.beans.factory.support.AbstractBeanFactory destroySingletons INFO: Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [schedulerFactoryBean,test]; root of BeanFactory hierarchy} 11-May-2005 19:11:49 org.springframework.scheduling.quartz.SchedulerFactoryBean destroy INFO: Shutting down Quartz scheduler 11-May-2005 19:11:49 org.quartz.core.QuartzScheduler shutdown INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down. 11-May-2005 19:11:49 org.quartz.core.QuartzScheduler pause INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED paused. 11-May-2005 19:11:49 org.quartz.core.QuartzScheduler shutdown INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete. Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'test' defined in class path resource [context.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 [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean] for property 'schedulerFactoryBean'] PropertyAccessExceptionsException (1 errors) org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean] for property 'schedulerFactoryBean' at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:1010) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:772) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:679) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:819) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:846) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:835) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:896) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:714) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:331) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:257) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:319) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:80) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:56) at test.SchedulerTest.main(SchedulerTest.java:20) 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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:78) Process finished with exit code 1

    Spring JIRA | 1 decade ago | Vurti Galka
    org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean] for property 'schedulerFactoryBean'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    An exception is thrown when injecting a SchedulerFactoryBean: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean] for property 'schedulerFactoryBean' -------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="schedulerFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"/> <bean id="test" class="test.SchedulerTest"> <property name="schedulerFactoryBean"><ref local="schedulerFactoryBean"/></property> </bean> </beans> -------------------------------------------------------------------- package test; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.scheduling.quartz.SchedulerFactoryBean; public class SchedulerTest { private SchedulerFactoryBean schedulerFactoryBean; public void setSchedulerFactoryBean(SchedulerFactoryBean schedulerFactoryBean) { this.schedulerFactoryBean = schedulerFactoryBean; } public static void main(String[] args) { new ClassPathXmlApplicationContext("context.xml"); } } -------------------------------------------------------------------- 11-May-2005 19:11:48 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [context.xml] 11-May-2005 19:11:49 org.springframework.context.support.AbstractRefreshableApplicationContext refreshBeanFactory INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=3043939]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [schedulerFactoryBean,test]; root of BeanFactory hierarchy 11-May-2005 19:11:49 org.springframework.context.support.AbstractApplicationContext refresh INFO: 2 beans defined in application context [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=3043939] 11-May-2005 19:11:49 org.springframework.core.CollectionFactory <clinit> INFO: JDK 1.4+ collections available 11-May-2005 19:11:49 org.springframework.context.support.AbstractApplicationContext initMessageSource INFO: Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@19f953d] 11-May-2005 19:11:49 org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@1eed786] 11-May-2005 19:11:49 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [schedulerFactoryBean,test]; root of BeanFactory hierarchy] 11-May-2005 19:11:49 org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'schedulerFactoryBean' 11-May-2005 19:11:49 org.quartz.simpl.SimpleThreadPool initialize INFO: Job execution threads will use class loader of thread: main 11-May-2005 19:11:49 org.quartz.simpl.RAMJobStore initialize INFO: RAMJobStore initialized. 11-May-2005 19:11:49 org.quartz.impl.StdSchedulerFactory instantiate INFO: Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties' 11-May-2005 19:11:49 org.quartz.impl.StdSchedulerFactory instantiate INFO: Quartz scheduler version: 1.4.5 11-May-2005 19:11:49 org.springframework.scheduling.quartz.SchedulerFactoryBean startScheduler INFO: Starting Quartz scheduler now 11-May-2005 19:11:49 org.quartz.core.QuartzScheduler start INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started. 11-May-2005 19:11:49 org.springframework.beans.factory.support.AbstractBeanFactory getBean INFO: Creating shared instance of singleton bean 'test' 11-May-2005 19:11:49 org.springframework.beans.factory.support.AbstractBeanFactory destroySingletons INFO: Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [schedulerFactoryBean,test]; root of BeanFactory hierarchy} 11-May-2005 19:11:49 org.springframework.scheduling.quartz.SchedulerFactoryBean destroy INFO: Shutting down Quartz scheduler 11-May-2005 19:11:49 org.quartz.core.QuartzScheduler shutdown INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down. 11-May-2005 19:11:49 org.quartz.core.QuartzScheduler pause INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED paused. 11-May-2005 19:11:49 org.quartz.core.QuartzScheduler shutdown INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete. Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'test' defined in class path resource [context.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 [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean] for property 'schedulerFactoryBean'] PropertyAccessExceptionsException (1 errors) org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean] for property 'schedulerFactoryBean' at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:1010) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:772) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:679) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:819) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:846) at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:835) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:896) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:714) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:331) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:257) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:319) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:80) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:56) at test.SchedulerTest.main(SchedulerTest.java:20) 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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:78) Process finished with exit code 1

    Spring JIRA | 1 decade ago | Vurti Galka
    org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean] for property 'schedulerFactoryBean'
  6. 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}]

    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 [java.lang.String] to required type [java.util.Date]

      at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary()
    2. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:1040)
      2. org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:917)
      3. org.springframework.beans.factory.support.AbstractBeanFactory.doTypeConversionIfNecessary(AbstractBeanFactory.java:601)
      4. org.springframework.beans.factory.support.AbstractBeanFactory.doTypeConversionIfNecessary(AbstractBeanFactory.java:581)
      5. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:123)
      6. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:225)
      7. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
      8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:891)
      9. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:707)
      10. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:316)
      11. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
      12. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
      13. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:271)
      13 frames
    3. Spring Context
      ClassPathXmlApplicationContext.<init>
      1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:310)
      2. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:80)
      3. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65)
      4. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:56)[/code]
      4 frames