Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0.0-M2
-
None
-
None
Description
The documentation example on the page http://mina.apache.org/ftpserver/listeners.html
shows the "local-address" attribute for the <nio-listener> element. But this results in an exception:
org.springframework.beans.InvalidPropertyException: Invalid property 'localAddress' of bean class [org.apache.ftpserver.listener.nio.NioListener]: No property 'localAddress' found
I checked the code of the NioListener and AbstractListener class and there is a setServerAddress() method. So I tried <nio-listener server-address="..."> instead, but now the XML file doesn't validate against ftpserver-1.0.xsd. I have also tried to change the "local-address" to "server-address" in ftpserver-1.0.xsd. Now, I don't get any exceptions but the server address is still not set. This, I think, is because the ListenerBeanDefinitionParser class is looking for local-address attribute. Am I correct about this and may the following change to the ListenerBeanDefinitionParser class fix this problem?
InetAddress serverAddress = SpringUtil.parseInetAddress(element, "server-address");
if(serverAddress != null)
If so, I may try to provide a patch, but it will not be until next week.