<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont

简介: 1 问题出现 当我试着去https://github.com/Red5/red5-server下载Red5的源码,我是把自己编译源码的, 最终的Red5-server需要依赖其他几个组件: (1) red5...

1 问题出现
当我试着去https://github.com/Red5/red5-server下载Red5的源码,我是把自己编译源码的,
最终的Red5-server需要依赖其他几个组件:
(1) red5-service
(2) red5-server-common
(3) red5-io
一次编译完上面三个项目之后,开始输入命令编译red5-server,因为这个才是我们最终想要的流媒体服务器.

mvn -Dmaven.test.skip=true install

当让有上面这一步还不够:上面只是完成了编译工作.我们还需要把red5运行的文件大成压缩包。

mvn -Dmaven.test.skip=true clean package -P assemble

这样完成之后,你将会再red5-server的target目录看到如下内容:
target下文件
2 我首先会把red5-server-1.0.6-SNAPSHOT-server.zip复制到我常用的工作目录中去.然后解压该压缩包。解压之后看起来应该是这样:
解压后的文件目录
3 然后一起准备妥当,双击red5.bat ,会弹出一个新的黑色窗口.然后程序开始启动.但是当我启动过程中,意外的事情发生了.red5没有像我想象的那么顺利.却抛出如下异常信息:

2015-09-08 13:41:12,813 [Launcher:/oflaDemo] WARN  o.s.w.c.s.XmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'web.scope' defined in ServletContext resource [/WEB-INF/red5-web.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.red5.server.scope.Scope$ConcurrentScopeSet.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) ~[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$1.getObject(AbstractBeanFactory.java:303) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) ~[spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) ~[spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.red5.server.tomcat.TomcatLoader$1.run(TomcatLoader.java:485) [tomcatplugin-1.9.jar:na]
Caused by: java.lang.NoSuchMethodError: org.red5.server.scope.Scope$ConcurrentScopeSet.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
    at org.red5.server.scope.Scope$ConcurrentScopeSet.hasName(Scope.java:1411) ~[red5-server-common-1.0.6-SNAPSHOT.jar:na]
    at org.red5.server.scope.Scope.hasChildScope(Scope.java:819) ~[red5-server-common-1.0.6-SNAPSHOT.jar:na]
    at org.red5.server.scope.Scope.init(Scope.java:872) ~[red5-server-common-1.0.6-SNAPSHOT.jar:na]
    at org.red5.server.scope.WebScope.register(WebScope.java:225) ~[red5-server.jar:na]
    at org.red5.server.scope.WebScope.afterPropertiesSet(WebScope.java:111) ~[red5-server.jar:na]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
    ... 10 common frames omitted

4 问题解决方法
导致问题代码:
Caused by: java.lang.NoSuchMethodError: org.red5.server.scope.ScopeConcurrentScopeSet.keySet()Ljava/util/concurrent/ConcurrentHashMapKeySetView;
经过查阅资料最后发现是java版本的事,我的环境一直用的jdk7 原来keySet不适合java8以下版本,解决方法:将java版本跳到java8版本,或者直接重新安装一个java8的jdk .

目录
相关文章
|
Web App开发 监控 前端开发
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
Hbase依赖的datanode日志中如果出现如下报错信息:DataXceiverjava.io.EOFException: INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Exception in receiveBlock for block  解决办法:Hbase侧配置的dfs.socket.timeout值过小,与DataNode侧配置的 dfs.socket.timeout的配置不一致,将hbase和datanode的该配置调成大并一致。
764 0
|
Web App开发 前端开发
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
PipeMapRed.waitOutputThreads(): subprocess failed with code X ,这里code X对应的信息如下:error code 1: Operation not perm...
912 0
|
Web App开发 前端开发
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
service cloudera-scm-agent stop service cloudera-scm-agent stop umount /var/run/cloudera-scm-agent/process umo...
739 0
|
Web App开发 存储 监控
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
原文链接:https://blogs.apache.org/flume/entry/apache_flume_filechannel 说明:翻译在尽量符合原文表达的基础上,尽量保证行文流畅。
833 0
|
Web App开发 索引
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
  Struts2注解 1 Struts2注解的作用 使用注解可以用来替换struts.xml配置文件!!! 2 导包   必须导入struts2-convention-plugin-2.3.15.jar包,它在struts2安装包下lib目录中。
787 0
|
Web App开发 前端开发 安全
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
1 这是北京交通大学的镜像站:http://mirror.bjtu.edu.cn/cn/ 2 这个站点有一个好处就是他不仅是操作系统的镜像站而且还要一写其他常用软件的仓库,   如Apache的常用软件 hbase 和hive等,http://mirror.
912 0
|
Web App开发 存储 测试技术
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
FastDFS文件系统(二) fastdfs和其他文件系统区别 一、概述 普通存储方案:Rsync、DAS(IDE/SATA/SAS/SCSI等块)、NAS(NFS、CIFS、SAMBA等文件系统)、SAN(Fib...
1251 0
|
Web App开发 Java 测试技术
|
Web App开发 前端开发 API
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
这几天在使用LigerUI(版本为1.2.2)编辑表格组件的时候,遇到几个小问题,从官方demo和api中没有找到解决的办法 问题1、从数据库查询出来的主键单元格不可编辑问题 主键单元格已经保存之前编辑的数据,由于是...
938 0