org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'submissionDateFormatter' defined in file [%path%\target\classes\spring\integration\elections-submission-service-int.xml]: No matching factory method found: factory method 'ofPattern(String,Locale)'. Check that a method with the specified name and arguments exists and that it is static.

Spring JIRA | Ievgen Starodiedov | 9 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    The following bean declaration causes BeanCreationException: {code:xml} <bean id="submissionDateFormatter" class="java.time.format.DateTimeFormatter" factory-method="ofPattern"> <constructor-arg name="pattern" value="dd-MMM-yyyy HH:mm"/> <constructor-arg name="locale" value="#{T(java.util.Locale).UK}"/> </bean> {code} (!) Path to file with bean definition is partially hidden according to NDA (!) {noformat} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'submissionDateFormatter' defined in file [%path%\target\classes\spring\integration\elections-submission-service-int.xml]: No matching factory method found: factory method 'ofPattern(String,Locale)'. Check that a method with the specified name and arguments exists and that it is static. at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:551) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1113) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1008) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) ~[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) ~[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) ~[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) ~[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE] at com.ubs.f35.core.server.container.ContainerStart.main(ContainerStart.java:25) ~[core-server-container-3.0.1.jar:na] {noformat} The same declaration without constructor argument names causes no exception though {code:xml} <bean id="submissionDateFormatter" class="java.time.format.DateTimeFormatter" factory-method="ofPattern"> <constructor-arg value="dd-MMM-yyyy HH:mm"/> <constructor-arg value="#{T(java.util.Locale).UK}"/> </bean> {code} ---- Spring version - *4.1.0.RELEASE* Java version - *1.8.0_05*

    Spring JIRA | 9 months ago | Ievgen Starodiedov
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'submissionDateFormatter' defined in file [%path%\target\classes\spring\integration\elections-submission-service-int.xml]: No matching factory method found: factory method 'ofPattern(String,Locale)'. Check that a method with the specified name and arguments exists and that it is static.
  2. 0

    The following bean declaration causes BeanCreationException: {code:xml} <bean id="submissionDateFormatter" class="java.time.format.DateTimeFormatter" factory-method="ofPattern"> <constructor-arg name="pattern" value="dd-MMM-yyyy HH:mm"/> <constructor-arg name="locale" value="#{T(java.util.Locale).UK}"/> </bean> {code} (!) Path to file with bean definition is partially hidden according to NDA (!) {noformat} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'submissionDateFormatter' defined in file [%path%\target\classes\spring\integration\elections-submission-service-int.xml]: No matching factory method found: factory method 'ofPattern(String,Locale)'. Check that a method with the specified name and arguments exists and that it is static. at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:551) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1113) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1008) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) ~[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) ~[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) ~[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) ~[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE] at com.ubs.f35.core.server.container.ContainerStart.main(ContainerStart.java:25) ~[core-server-container-3.0.1.jar:na] {noformat} The same declaration without constructor argument names causes no exception though {code:xml} <bean id="submissionDateFormatter" class="java.time.format.DateTimeFormatter" factory-method="ofPattern"> <constructor-arg value="dd-MMM-yyyy HH:mm"/> <constructor-arg value="#{T(java.util.Locale).UK}"/> </bean> {code} ---- Spring version - *4.1.0.RELEASE* Java version - *1.8.0_05*

    Spring JIRA | 9 months ago | Ievgen Starodiedov
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'submissionDateFormatter' defined in file [%path%\target\classes\spring\integration\elections-submission-service-int.xml]: No matching factory method found: factory method 'ofPattern(String,Locale)'. Check that a method with the specified name and arguments exists and that it is static.
  3. 0

    " org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource

    Stack Overflow | 2 years ago | Ashvin Ranpariya
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 't' defined in class path resource [resources/spring.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'URL' of bean class [beans.Test]: Bean property 'URL' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Getting error while dynamically providing input,output path

    Stack Overflow | 10 months ago | Varun Maurya
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'step1': Cannot resolve reference to bean 'itemReader' while setting bean property 'itemReader'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itemReader' defined in class path resource [spring/config/process-config.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type [com.sun.proxy.$Proxy11 implementing org.springframework.batch.item.ItemStreamReader,org.springframework.batch.item.ItemStream,org.springframework.aop.scope.ScopedObject,java.io.Serializable,org.springframework.aop.framework.AopInfrastructureBean,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [org.springframework.batch.item.file.MultiResourceItemReader] for property 'multiReader'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.sun.proxy.$Proxy11 implementing org.springframework.batch.item.ItemStreamReader,org.springframework.batch.item.ItemStream,org.springframework.aop.scope.ScopedObject,java.io.Serializable,org.springframework.aop.framework.AopInfrastructureBean,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [org.springframework.batch.item.file.MultiResourceItemReader] for property 'multiReader': no matching editors or conversion strategy found
  6. 0

    Issues in serializers config

    GitHub | 4 years ago | dsukhoroslov
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hzInstance': Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static com.hazelcast.core.HazelcastInstance com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(com.hazelcast.config.Config)] threw exception; nested exception is com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.NoSuchMethodException: com.hazelcast.nio.serialization.PortableSerializer.<init>()

  1. batwalrus76 3 times, last 2 months ago
  2. Andreas Häber 2 times, last 2 weeks ago
  3. treefolk 1 times, last 3 weeks ago
  4. mauritius 2 times, last 2 months ago
  5. jpvee 1 times, last 2 months ago
25 more registered users
70 unregistered visitors
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.factory.BeanCreationException

    Error creating bean with name 'submissionDateFormatter' defined in file [%path%\target\classes\spring\integration\elections-submission-service-int.xml]: No matching factory method found: factory method 'ofPattern(String,Locale)'. Check that a method with the specified name and arguments exists and that it is static.

    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod()
  2. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:551)[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1113)[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1008)[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505)[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    6. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    7. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    8. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    9. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    10. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725)[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    10 frames
  3. Spring Context
    ClassPathXmlApplicationContext.<init>
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    3. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    4. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)[spring-context-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    4 frames
  4. com.ubs.f35
    ContainerStart.main
    1. com.ubs.f35.core.server.container.ContainerStart.main(ContainerStart.java:25)[core-server-container-3.0.1.jar:na]
    1 frame