You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Nicklas Nordborg <ni...@thep.lu.se> on 2008/08/13 12:56:01 UTC
local-address is invalid property of bean class NioListener
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) {
builder.addPropertyValue("serverAddress", serverAddress);
}
If so, I may try to provide a patch, but it will not be until next week.
/Nicklas
Re: local-address is invalid property of bean class NioListener
Posted by Nicklas Nordborg <ni...@thep.lu.se>.
Niklas Gustavsson wrote:
> On Wed, Aug 13, 2008 at 12:56 PM, Nicklas Nordborg <ni...@thep.lu.se> wrote:
>> 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've opened a new JIRA issue (FTPSERVER-153) and commited a fix for
> this. Thanks for reporting, please verify that it fixes your problem.
>
> /niklas
Yes it seems like it does. Thanks for a quick reply and fix.
/Nicklas
Re: local-address is invalid property of bean class NioListener
Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Wed, Aug 13, 2008 at 12:56 PM, Nicklas Nordborg <ni...@thep.lu.se> wrote:
> 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've opened a new JIRA issue (FTPSERVER-153) and commited a fix for
this. Thanks for reporting, please verify that it fixes your problem.
/niklas