0
目前正在使用連接到red5的flashchat。Red5chat連接迭代器失敗
使用的web應用:http://www.freedevelopment.net/articles/free-red5chat.html
用戶可以連接,聊天。但私人消息和管理員操作失敗。
這是因爲有下列錯誤:
Caused by: java.lang.ClassCastException:
java.util.concurrent.ConcurrentHashMap$Values
cannot be cast to java.util.Iterator at
net.freedevelopment.chat.Application.kick(Application.java:302)
的代碼中有規定:
public void kick(String _id) {
Iterator<IConnection> it = scope.getConnections();
//log.debug("kick called: "+_id);
while (it.hasNext()) {
IConnection conn = it.next();
String id=conn.getClient().getId();
if (!(_id.equals(id))) continue;
if (conn instanceof IServiceCapableConnection) {
((IServiceCapableConnection) conn).invoke("IhaveBeenKicked", new Object[]{_id});
log.info("kick "+_id);
}
}
} // line 302
所以我想迭代器是無效的,但我不知道這應該是什麼鑄造。
Thanx提前!
行編號有些問題。你能否也請顯示'net.freedevelopment.chat.Application.kick'方法? – bezmax
@Max使用踢球法編輯 – Johan
奇怪,檢查了API和示例,一切似乎都沒有問題。然而你的行編號仍然搞砸了。我猜你忘了部署新版本或類似的東西。 – bezmax