Skip to content

Spring3.2 bug context:property-placeholder nested search property appear java.lang.StackOverflowError [SPR-10549] #15180

@spring-projects-issues

Description

@spring-projects-issues

zhangkaitao opened SPR-10549 and commented

<context:property-placeholder location="classpath:resources.properties" ignore-unresolvable="true"/>  
  1. resources.properties
abc=${dce} 
dce=${none}

3

@Value("${abc}")  
private String abc; 
  1. 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


Affects: 3.2.2

Reference URL: http://jinnianshilongnian.iteye.com/blog/1866880

Issue Links:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions