views:

35

answers:

1

Anyone know of a good way to get rid of this warning, besides increasing the log level? Mind you everything in the server still works as expected, but this occurs every time the server is restarted.

o.s.b.f.c.CustomEditorConfigurer - Passing PropertyEditor instances into CustomEditorConfigurer is deprecated: use PropertyEditorRegistrars or PropertyEditor class names instead. Offending key [java.net.SocketAddress; offending editor instance: org.apache.mina.integration.beans.InetSocketAddressEditor@314585

The Red5 server is using Apache Mina 2.0 and Spring 3.0.4, but the warning has been showing up since Spring 2.5 or so.

+1  A: 

I'm guessing you probably have something like this in a Spring XML file:

<bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
    <property name="customEditors">
        <map>
            <entry key="java.net.SocketAddress">
                <bean class="org.apache.mina.integration.beans.InetSocketAddressEditor" />
            </entry>
        </map>
    </property>
</bean>

As the warning says, passing PropertyEditor instances into a CustomEditorConfigurer is deprecated. However it's OK to use PropertyEditor class names instead.

You can read more about this in the Javadoc for CustomEditorConfigurer.

The simple fix in your case is to use a class name as the map entry value, instead of an InetSocketAddressEditor instance:

<bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
    <property name="customEditors">
        <map>
            <entry key="java.net.SocketAddress" value="org.apache.mina.integration.beans.InetSocketAddressEditor" />
        </map>
    </property>
</bean>
Richard Fearn
@Richard, thanks it is now fixed!
Mondain