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 | 7 months ago
  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 | 7 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 | 7 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

    Getting error while dynamically providing input,output path

    Stack Overflow | 8 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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Issues in serializers config

    GitHub | 3 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>()
  6. 0

    'circle' defined in class path resource [Spring.xml]: Initialization of bean failed; nested exception is java.lang.IllegalAccessError

    Stack Overflow | 3 years ago | user2681868
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'circle' defined in class path resource [Spring.xml]: Initialization of bean failed; nested exception is java.lang.IllegalAccessError

  1. batwalrus76 7 times, last 1 week ago
  2. rlovtangen 1 times, last 2 weeks ago
  3. tvrmsmith 6 times, last 3 weeks ago
  4. kjhdofjosvs 1 times, last 1 month ago
  5. Andreas Häber 2 times, last 1 month ago
23 more registered users
72 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