Red5对我来说还不错,然后我决定升级到最新版本。但新版本给我一个错误。我正在运行一个简单的客户端App。当我尝试连接时,即使我连接到另一个应用程序,我也会看到异常,connection.connect(" rtmp:// localhost / crazyName")它也会在这种情况下显示异常。请有人帮我这个。
package org.red5.core;
import org.red5.logging.Red5LoggerFactory;
import org.red5.server.adapter.MultiThreadedApplicationAdapter;
import org.red5.server.api.IConnection;
import org.red5.server.api.IScope;
//import org.slf4j.Logger;
/**
* Sample application that uses the client manager.
*
* @author The Red5 Project (red5@osflash.org)
*/
public class Application extends MultiThreadedApplicationAdapter {
//private static Logger log = Red5LoggerFactory.getLogger(Application.class);
/** {@inheritDoc} */
@Override
public boolean connect(IConnection conn, IScope scope, Object[] params) {
//log.info("appConnect");
return true;
}
/** {@inheritDoc} */
@Override
public void disconnect(IConnection conn, IScope scope) {
//log.info("disconnect");
super.disconnect(conn, scope);
}
}
client
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="onCreationComplete(event)">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
private var connection:NetConnection;
public function onCreationComplete(event:FlexEvent) : void {
// setup connection code
connection = new NetConnection();
connection.connect("rtmp://localhost/Project");
connection.addEventListener(NetStatusEvent.NET_STATUS, onConnectionNetStatus);
connection.client = this;
}
public function onConnectionNetStatus(event:NetStatusEvent) : void {
// did we successfully connect
if(event.info.code == "NetConnection.Connect.Success") {
Alert.show("Successful Connection", "Information");
} else {
Alert.show("Unsuccessful Connection", event.info.code);
}
}
]]>
</mx:Script>
</mx:Application>
[WARN] [NioProcessor-4] org.red5.server.net.rtmp.RTMPConnManager - Exception creating connection
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rtmpMinaConnection' defined in class path resource [red5-core.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'deadlockGuardScheduler' of bean class [org.red5.server.net.rtmp.RTMPMinaConnection]: Bean property 'deadlockGuardScheduler' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1514) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1222) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:217) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:350) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:331) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:968) ~[spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.red5.server.net.rtmp.RTMPConnManager.createConnectionInstance(RTMPConnManager.java:306) [red5-server-common-1.0.6-SNAPSHOT.jar:1.0.6-SNAPSHOT]
at org.red5.server.net.rtmp.RTMPConnManager.createConnection(RTMPConnManager.java:166) [red5-server-common-1.0.6-SNAPSHOT.jar:1.0.6-SNAPSHOT]
at org.red5.server.net.rtmp.RTMPConnManager.createConnection(RTMPConnManager.java:56) [red5-server-common-1.0.6-SNAPSHOT.jar:1.0.6-SNAPSHOT]
at org.red5.server.net.rtmp.RTMPMinaIoHandler.createRTMPMinaConnection(RTMPMinaIoHandler.java:297) [red5-server-common-1.0.6-SNAPSHOT.jar:1.0.6-SNAPSHOT]
at org.red5.server.net.rtmp.RTMPMinaIoHandler.sessionCreated(RTMPMinaIoHandler.java:61) [red5-server-common-1.0.6-SNAPSHOT.jar:1.0.6-SNAPSHOT]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.sessionCreated(DefaultIoFilterChain.java:772) [mina-core-2.0.9.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionCreated(DefaultIoFilterChain.java:459) [mina-core-2.0.9.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$700(DefaultIoFilterChain.java:48) [mina-core-2.0.9.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.sessionCreated(DefaultIoFilterChain.java:913) [mina-core-2.0.9.jar:na]
at org.apache.mina.core.filterchain.IoFilterAdapter.sessionCreated(IoFilterAdapter.java:74) [mina-core-2.0.9.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextSessionCreated(DefaultIoFilterChain.java:459) [mina-core-2.0.9.jar:na]
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireSessionCreated(DefaultIoFilterChain.java:452) [mina-core-2.0.9.jar:na]
at org.apache.mina.core.service.IoServiceListenerSupport.fireSessionCreated(IoServiceListenerSupport.java:211) [mina-core-2.0.9.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.addNow(AbstractPollingIoProcessor.java:538) [mina-core-2.0.9.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.handleNewSessions(AbstractPollingIoProcessor.java:505) [mina-core-2.0.9.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:67) [mina-core-2.0.9.jar:na]
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1113) [mina-core-2.0.9.jar:na]
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64) [mina-core-2.0.9.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'deadlockGuardScheduler' of bean class [org.red5.server.net.rtmp.RTMPMinaConnection]: Bean property 'deadlockGuardScheduler' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1076) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:930) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:95) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1510) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
... 29 common frames omitted
[WARN] [NioProcessor-4] org.red5.server.net.rtmp.RTMPMinaIoHandler - Force close - session: 3
[WARN] [NioProcessor-4] org.red5.server.net.rtmp.RTMPMinaIoHandler - Force close - session: 3
[INFO] [NioProcessor-4] org.red5.server.net.rtmp.RTMPMinaIoHandler - Close already forced on this session: 3
答案 0 :(得分:0)
我遇到了同样的问题..但我在... / conf / red5-core.xml:
中评论了这一行property name =“deadlockGuardScheduler”ref =“deadlockGuardScheduler”
它对我有用......