SSH-ssh框架整合red5具体配置详解

WP主题讨论 WP主题讨论 主题:1013 回复:2239

SSH-ssh框架整合red5具体配置详解

浮生未歇 发布于 2017-04-19 字数 3782 浏览 1054 回复 1

使用red5和tomcat以及Spring能整合,客户端用flex模拟能正常通信,用独立的SSH框架开发的相关资源管理能正常启动和访问。但是将两个融合的时候,出现了相应的问题,具体的web.xml配置如下
<!-- 配置Red5 -->
<context-param>
<param-name>globalScope</param-name>
<param-value>default</param-value>
</context-param>
<context-param>
<param-name>parentContextKey</param-name>
<param-value>default.context</param-value>
</context-param>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>/Red5</param-value>
</context-param>
<!-- 指定Spring的配置文件 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:config/spring/.xml,
classpath:applicationContext4Web.xml,classpath:-web.xml</param-value>
</context-param>
<!-- 监听red5服务
<listener>
<listener-class>org.red5.server.war.WarLoaderServlet</listener-class>
</listener>-->
<!--
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- 定义Struts2的核心控制器 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
............................................
出现的错误是:org.springframework.beans.factory.access.BootstrapException: Unable to initialize group definition. Group resource name [classpath:beanRefContext.xml], factory key [default.context]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'default.context' defined in URL [file:/D:/apache-tomcat-6.0.30/webapps/ROOT/WEB-INF/classes/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'global.context' defined in class path resource [defaultContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [red5.core], from group with resource name [classpath:red5.xml]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'red5.core' is defined
大致问题出现在:
<!-- 监听red5服务
<listener>
<listener-class>org.red5.server.war.WarLoaderServlet</listener-class>
</listener>-->
<!--
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

支持 Markdown 语法,需要帮助?

评论(1

想挽留 2017-10-09 1 楼

请问这个问题解决了吗?我也遇到这个问题了 怎么解决呀