Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-11346

PlaceholderConfigurerSupport.doProcessProperties() loses stack trace on exception

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Complete
    • 3.2.6
    • 3.2.7, 4.0.1
    • Core:Environment
    • None
    • true

    Description

      In org.springframework.beans.factory.config.PlaceholderConfigurerSupport, the doProcessProperties() method contains the following code:

      				try {
      					visitor.visitBeanDefinition(bd);
      				}
      				catch (Exception ex) {
      					throw new BeanDefinitionStoreException(bd.getResourceDescription(), curName, ex.getMessage());
      				}
      

      This effectively loses all stack trace information for the original exception, ex. Other than the getMessage(), which may or may not be useful. It would be easy to change this to properly set the nested cause so as to preserve this information:

      					throw new BeanDefinitionStoreException(bd.getResourceDescription(), curName, ex.getMessage(), ex);
      

      Attachments

        Activity

          People

            juergen.hoeller Juergen Hoeller
            jryingst Jim Yingst
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3 years, 38 weeks, 1 day ago