org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lamp' defined in class ru.yandex.commune.junk.stepancheg.spring.scope.Main$Conf: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public ru.yandex.commune.junk.stepancheg.spring.scope.Lamp ru.yandex.commune.junk.stepancheg.spring.scope.Main$Conf.lamp()] threw exception; nested exception is java.lang.RuntimeException: must not be created because it is prototype

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Spring JIRA by Stepan Koltsov, 1 year ago
Error creating bean with name 'lamp' defined in class ru.yandex.commune.junk.stepancheg.spring.scope.Main$Conf: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public
via Spring JIRA by Stepan Koltsov, 1 year ago
Error creating bean with name 'lamp' defined in class ru.yandex.commune.junk.stepancheg.spring.scope.Main$Conf: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public
via freebsd.org by Unknown author, 2 years ago
Error creating bean with name 'int' defined in class com.ubnt.oOOO.new: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.ubnt.oOOO.D.D com.ubnt.oOOO.new.int
via GitHub by anon12345
, 1 month ago
Error creating bean with name '?00000' defined in class com.ubnt.service.AppContext: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [com.ubnt.service.oO0O.D
via GitHub by spring-issuemaster
, 1 year ago
Error creating bean with name 'springSecurityFilterChain' defined in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration: Instantiation of bean failed; nested exception is
via Stack Overflow by Vinod
, 2 years ago
Error creating bean with name 'helloWorldBean' defined in class com.websystique.spring.configuration.HelloWorldConfig: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lamp' defined in class ru.yandex.commune.junk.stepancheg.spring.scope.Main$Conf: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public ru.yandex.commune.junk.stepancheg.spring.scope.Lamp ru.yandex.commune.junk.stepancheg.spring.scope.Main$Conf.lamp()] threw exception; nested exception is java.lang.RuntimeException: must not be created because it is prototype
at ru.yandex.commune.junk.stepancheg.spring.scope.Lamp.(Lamp.java:8)
at ru.yandex.commune.junk.stepancheg.spring.scope.Main$Conf.lamp(Main.java:14)
at ru.yandex.commune.junk.stepancheg.spring.scope.Main$Conf$$EnhancerByCGLIB$$f6643148.CGLIB$lamp$0()
at ru.yandex.commune.junk.stepancheg.spring.scope.Main$Conf$$EnhancerByCGLIB$$f6643148$$FastClassByCGLIB$$1b831bfa.invoke()
at ru.yandex.commune.junk.stepancheg.spring.scope.Main$Conf$$EnhancerByCGLIB$$f6643148.lamp()
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:597)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:149)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:983)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:879)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
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.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at ru.yandex.commune.junk.stepancheg.spring.scope.Main.main(Main.java:20)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.