org.springframework.beans.factory

Class CannotLoadBeanClassException

  • All Implemented Interfaces:
    java.io.Serializable


    public class CannotLoadBeanClassException
    extends FatalBeanException
    Exception thrown when the BeanFactory cannot load the specified class of a given bean.
    Since:
    2.0
    Author:
    Juergen Hoeller
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      CannotLoadBeanClassException(java.lang.String resourceDescription, java.lang.String beanName, java.lang.String beanClassName, java.lang.ClassNotFoundException cause)
      Create a new CannotLoadBeanClassException.
      CannotLoadBeanClassException(java.lang.String resourceDescription, java.lang.String beanName, java.lang.String beanClassName, java.lang.LinkageError cause)
      Create a new CannotLoadBeanClassException.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getBeanClassName()
      Return the name of the class we were trying to load.
      java.lang.String getBeanName()
      Return the name of the bean requested.
      java.lang.String getResourceDescription()
      Return the description of the resource that the bean definition came from.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CannotLoadBeanClassException

        public CannotLoadBeanClassException(@Nullable
                                            java.lang.String resourceDescription,
                                            java.lang.String beanName,
                                            @Nullable
                                            java.lang.String beanClassName,
                                            java.lang.ClassNotFoundException cause)
        Create a new CannotLoadBeanClassException.
        Parameters:
        resourceDescription - description of the resource that the bean definition came from
        beanName - the name of the bean requested
        beanClassName - the name of the bean class
        cause - the root cause
      • CannotLoadBeanClassException

        public CannotLoadBeanClassException(@Nullable
                                            java.lang.String resourceDescription,
                                            java.lang.String beanName,
                                            @Nullable
                                            java.lang.String beanClassName,
                                            java.lang.LinkageError cause)
        Create a new CannotLoadBeanClassException.
        Parameters:
        resourceDescription - description of the resource that the bean definition came from
        beanName - the name of the bean requested
        beanClassName - the name of the bean class
        cause - the root cause
    • Method Detail

      • getResourceDescription

        @Nullable
        public java.lang.String getResourceDescription()
        Return the description of the resource that the bean definition came from.
      • getBeanName

        public java.lang.String getBeanName()
        Return the name of the bean requested.
      • getBeanClassName

        @Nullable
        public java.lang.String getBeanClassName()
        Return the name of the class we were trying to load.