org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MyClassName' defined in class path resource [appCtx-sp.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.pav.dit.auth.MyClassName]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.opensaml.saml2.metadata.provider.MetadataProviderException: Metadata provider has not been initialized

Coderanch | Pavan Chaudhari | 3 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    getting BeanCreationException

    Coderanch | 3 years ago | Pavan Chaudhari
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MyClassName' defined in class path resource [appCtx-sp.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.pav.dit.auth.MyClassName]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.opensaml.saml2.metadata.provider.MetadataProviderException: Metadata provider has not been initialized
  2. 0
    samebug tip
    You could be missing na annotation (@Service or @Component) or the <bean> definition in the xml. Also, look if the class where your implementation is located is properly scanned (check "<context:component-scan base-package=")
    via goo.gl
  3. 0

    技術検証2日目 | 男はロマン

    otokoroman.com | 12 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in class path resource [org/springframework/session/data/redis/config/annotation/web/http/RedisHttpSessionConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hessian Webservice with REST, Java Spring

    Stack Overflow | 4 years ago | Cid Immacula
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'photoService' bean method public java.lang.Object mppiwebservices.photoservices.impl.photo.PhotoServicesImpl.savePhoto(javax.servlet.http.HttpServletRequest,java.lang.String,java.lang.String,mppiwebservices.photoservices.pojo.Photo,org.springframework.validation.BindingResult,org.springframework.web.bind.support.SessionStatus) to {[/{user}/{folder_name}/savephoto/],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'photoServicesImpl' bean method public java.lang.Object mppiwebservices.photoservices.impl.photo.PhotoServicesImpl.savePhoto(javax.servlet.http.HttpServletRequest,java.lang.String,java.lang.String,mppiwebservices.photoservices.pojo.Photo,org.springframework.validation.BindingResult,org.springframework.web.bind.support.SessionStatus) mapped.
  6. 0

    Unable to create job repository with isolation level repeatable read

    Stack Overflow | 2 years ago | mpkorstanje
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobBuilders' defined in class path resource [org/springframework/batch/core/configuration/annotation/ModularBatchConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.batch.core.configuration.annotation.JobBuilderFactory org.springframework.batch.core.configuration.annotation.AbstractBatchConfiguration.jobBuilders() throws java.lang.Exception] threw exception; nested exception is java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given
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 'MyClassName' defined in class path resource [appCtx-sp.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.pav.dit.auth.MyClassName]: Constructor threw exception; nested exception is java.lang.RuntimeException: org.opensaml.saml2.metadata.provider.MetadataProviderException: Metadata provider has not been initialized

    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor()
  2. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:288)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    6. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    7. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    8. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    9. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    10. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
    10 frames
  3. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
    2 frames
  4. com.manh.spring
    ContextLoaderListener.contextInitialized
    1. com.manh.spring.ContextLoader.createWebApplicationContext(ContextLoader.java:132)
    2. com.manh.spring.ContextLoader.initWebApplicationContext(ContextLoader.java:66)
    3. com.manh.spring.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:24)
    3 frames
  5. Glassfish Core
    StandardContext.start
    1. org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392)
    2. org.apache.catalina.core.StandardContext.start(StandardContext.java:3850)
    2 frames
  6. JBoss Web
    WebDeploymentService.start
    1. org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
    1 frame
  7. JBoss Modular Service Container
    ServiceControllerImpl$StartTask.run
    1. org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    2. org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    2 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    3. java.lang.Thread.run(Thread.java:619)
    3 frames