• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • SpringRuntime
  • hhuynh
  • Reporter: gkeim
  • November 13, 2007
  • 0
  • Watchers: 0
  • January 23, 2008
  • November 13, 2007


If you run the same Spring application on both Windows and Unix, using the same server, you’ll get two different roots because the generated root name for the applicationContext are different due to differing values for the line.separator system property.

By default, if no custom appContext root-name is declared in the config, DistributableBeanFactoryMixin.calculateId generates a string that combines the application name and all bean definition locations. For the JMX demo that would be:

app jmx params demo/jmx/applicationContext.xml

This string is then MD5’d and ASCII-encoded resulting in the root name:


Because there are platform-dependent newline characters in the source string, the generated root names are different for the same configuration.

Fix: in the source string, replace System.getProperty(“line.separator”) –> some other character Workaround: specify a custom root-name for your application-context:

*/applicationContext.xml applicationContext