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

Spring3.2 bug context:property-placeholder nested search property appear java.lang.StackOverflowError

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.2.2
    • Fix Version/s: 3.2.4, 4.0 M3
    • Component/s: None
    • Labels:
      None

      Description

      1.

      <context:property-placeholder location="classpath:resources.properties" ignore-unresolvable="true"/>  
      

      2. resources.properties

      abc=${dce} 
      dce=${none}
      

      3

      @Value("${abc}")  
      private String abc; 
      

      4. appear

      java.lang.StackOverflowError
      	at java.security.AccessController.doPrivileged(Native Method)
      	at com.sun.naming.internal.VersionHelper12.getJndiProperties(VersionHelper12.java:106)
      	at com.sun.naming.internal.ResourceManager.getInitialEnvironment(ResourceManager.java:202)
      	at javax.naming.InitialContext.init(InitialContext.java:238)
      	at javax.naming.InitialContext.<init>(InitialContext.java:216)
      	at org.springframework.jndi.JndiTemplate.createInitialContext(JndiTemplate.java:136)
      	at org.springframework.jndi.JndiTemplate.getContext(JndiTemplate.java:103)
      	at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
      	at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)
      	at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
      	at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
      	at org.springframework.jndi.JndiLocatorDelegate.lookup(JndiLocatorDelegate.java:38)
      	at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:77)
      	at org.springframework.jndi.JndiLocatorDelegate.lookup(JndiLocatorDelegate.java:33)
      	at org.springframework.jndi.JndiPropertySource.getProperty(JndiPropertySource.java:82)
      	at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:73)
      	at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:59)
      	at org.springframework.core.env.AbstractEnvironment.getProperty(AbstractEnvironment.java:427)
      	at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:131)
      	at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:128)
      	at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:73)
      	at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:59)
      	at org.springframework.core.env.AbstractPropertyResolver$1.resolvePlaceholder(AbstractPropertyResolver.java:176)
      	at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:146)
      	at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:125)
      

      why:
      please see http://jinnianshilongnian.iteye.com/blog/1866892

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                juergen.hoeller Juergen Hoeller
                Reporter:
                zhangkaitao zhangkaitao
                Last updater:
                Spring Issuemaster
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  26 weeks ago