Bug #43540 trailing spaces in config.properties cause problem at startup (wrong jdbc link)
Submitted: 10 Mar 2009 18:20 Modified: 22 May 2009 8:53
Reporter: Andrii Nikitin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Server Severity:S3 (Non-critical)
Version:2.0.4.7141 OS:Any
Assigned to: Sloan Childers CPU Architecture:Any

[10 Mar 2009 18:20] Andrii Nikitin
Description:
When occasionally trailing space (or tab character) is added into parameters in 'config.properties' file, MEM fails to start with following errors in log:

ERROR [Thread-1:org.springframework.web.context.ContextLoader] Context initialization failed
...
Caused by: java.sql.SQLException: Illegal connection port value '13306	'
...

Resolving the problem may require detailed logs investigation because config file "looks" OK.

How to repeat:
edit 'apache-tomcat/webapps/ROOT/WEB-INF/config.properties' file and add trailing 'tab' character to parameter 'mysql.port' -> mem will fail to start 

Suggested fix:
call string.trim() for parameters when form jdbc connect string
(also make sure that 'mysql.pass' will not not be trimmed).
[10 Mar 2009 20:41] Sloan Childers
fixed in trunk (ie. 2.1)
[13 Mar 2009 5:15] Keith Russell
Patch installed in versions => 2.1.0.1015.
[17 Mar 2009 19:14] Bill Weber
verified fixed in build 2.1.0.1015
[22 May 2009 8:53] Tony Bedford
An entry has been added to the 2.1.0 changelog:

When a trailing space, or tab character, was added at the end of a parameter in the config.properties file, MySQL Enterprise Monitor failed to start and generated the following errors in log:

ERROR [Thread-1:org.springframework.web.context.ContextLoader] Context initialization
failed
...
Caused by: java.sql.SQLException: Illegal connection port value '13306'
...

Resolving the problem required detailed log analysis because the configuration file did not show any apparent problems.