Red5 :在 Red5 运行时部署(WAR 部署失败:org.springframework.beans.factory.BeanDefinitionStoreException),而正常部署正常)
我需要能够在 Red5 运行时进行部署。我知道的唯一解决方案是使用 WAR 文件并将其放入文件夹:webapp。
还有其他办法吗?
我正在使用 Red 5 v0.8。我使用 Eclipse 3.4 导出了 WAR 文件。
我可以部署我的网络应用程序。但是,当我将其导出为 WAR 文件时,我有 一条错误消息,并创建一个空文件夹(参见最后的错误消息)。 当我安装 Red5 提供的示例时,WAR 会正确部署。 我通过映射 SOSample 和我的完全相同的文件来测试它 webapp 为 WEB-INF (我刚刚更改了 webapp 的名称),但是 问题仍然存在。
我尝试过项目 -> clean...,把之前的webapps文件夹删除了 将 war 文件复制到其中。我检查了一下,正常部署时 这是正确的文件。尽管如此,还是同样的行为。
这可能是一件简单的事情,但我仍然对 Spring 不太了解,我必须 错过一些简单的事情。
预先感谢您可以给我的任何帮助,
Fabio
---------------------- 错误消息
[INFO] [Red5_Scheduler_Worker-1] org.red5.server .tomcat.TomcatLoader - 应用程序 根目录:C:/eclipse/applications/Red5/webapps [警告] [启动器:/添加] org.red5.server.tomcat.TomcatLoader - default.c 在上下文中找不到 ontext bean:red5.core 线程“Launcher:/Addition”org.springframework.beans.factory 中出现异常。 BeanDefinitionStoreException:无法解析 bean 定义资源模式 [/WEB-INF/red5-*.xml];嵌套异常是 java.io.FileNotFoundException: Servl etContext 资源 [/WEB-INF/] 无法解析为 URL,因为它不存在 英石 在 org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:190) 在 org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) 在 org.springframework.web.context.support.XmlWebApplicationContext.load BeanDefinitions(XmlWebApplicationContext.java:124) 在 org.springframework.web.context.support.XmlWebApplicationContext.load BeanDefinitions(XmlWebApplicationContext.java:92) 在 org.springframework.context.support.AbstractRefreshableApplicationCon text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123) 在 org.springframework.context.support.AbstractApplicationContext.obtain FreshBeanFactory(AbstractApplicationContext.java:422) 在 org.springframework.context.support.AbstractApplicationContext.refres h(AbstractApplicationContext.java:352) 在 org.red5.server.tomcat.TomcatLoader$2.run(TomcatLoader.java:733) 引起原因:java.io.FileNotFoundException:ServletContext资源[/WEB-INF/] ca 由于 URL 不存在,因此无法解析为 URL 在 org.springframework.web.context.support.ServletContextResource.getURL (ServletContextResource.java:130) 在 org.springframework.core.io.support.PathMatchingResourcePatternResolv er.isJarResource(PathMatchingResourcePatternResolver.java:406) 在 org.springframework.core.io.support.PathMatchingResourcePatternResolv er.findPathMatchingResources(PathMatchingResourcePatternResolver.java:338) 在 org.springframework.core.io.support.PathMatchingResourcePatternResolv er.getResources(PathMatchingResourcePatternResolver.java:276) 在 org.springframework.context.support.AbstractApplicationContext.getRes 来源(AbstractApplicationContext.java:1018) 在 org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:177) ... 7 更多
-------------------------- 代码来源 ----------------- ------ 包org.red5.core; 导入 org.red5.server.adapter.MultiThreadedApplicationAdapter;
公共类应用程序扩展了 MultiThreadedApplicationAdapter {
public Double add(Double a, Double b) {
return a+b;
}
}
I need to be able to deploy while Red5 is running. The only solution I know is to use WAR file and put it in the folder : webapp.
Is there any other way ?
I'm using Red 5 v0.8. And I exported a WAR file using Eclipse 3.4.
I can deploy my webapp. However when I export it as a WAR file, I have
an error message and it creates an empty folder (cf see error message at the end).
When I install the samples given with Red5, the WAR deploys correctly.
I tested it by mapping exactly the same files of SOSample and my
webapp for WEB-INF (I've just changed the name of the webapps), but
the problem persists.
I tried Project -> Clean ..., deleted the webapps folder before
copying the war files into it. I checked that when it's deployed normally
that's the correct files. Still, the same behaviour.
It might be a simple thing but still I don't much about Spring, I must
miss something simple.
Thank you in advance for any help you could give me,
Fabio
---------------------- Error message
[INFO] [Red5_Scheduler_Worker-1] org.red5.server.tomcat.TomcatLoader - Applicati
on root: C:/eclipse/applications/Red5/webapps
[WARN] [Launcher:/Addition] org.red5.server.tomcat.TomcatLoader - default.c
ontext bean was not found in context: red5.core
Exception in thread "Launcher:/Addition" org.springframework.beans.factory.
BeanDefinitionStoreException: Could not resolve bean definition resource pattern
[/WEB-INF/red5-*.xml]; nested exception is java.io.FileNotFoundException: Servl
etContext resource [/WEB-INF/] cannot be resolved to URL because it does not exi
st
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:190)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
at org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:124)
at org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:92)
at org.springframework.context.support.AbstractRefreshableApplicationCon
text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplicationContext.obtain
FreshBeanFactory(AbstractApplicationContext.java:422)
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:352)
at org.red5.server.tomcat.TomcatLoader$2.run(TomcatLoader.java:733)
Caused by: java.io.FileNotFoundException: ServletContext resource [/WEB-INF/] ca
nnot be resolved to URL because it does not exist
at org.springframework.web.context.support.ServletContextResource.getURL
(ServletContextResource.java:130)
at org.springframework.core.io.support.PathMatchingResourcePatternResolv
er.isJarResource(PathMatchingResourcePatternResolver.java:406)
at org.springframework.core.io.support.PathMatchingResourcePatternResolv
er.findPathMatchingResources(PathMatchingResourcePatternResolver.java:338)
at org.springframework.core.io.support.PathMatchingResourcePatternResolv
er.getResources(PathMatchingResourcePatternResolver.java:276)
at org.springframework.context.support.AbstractApplicationContext.getRes
ources(AbstractApplicationContext.java:1018)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:177)
... 7 more
-------------------------- Code Source -----------------------
package org.red5.core;
import org.red5.server.adapter.MultiThreadedApplicationAdapter;
public class Application extends MultiThreadedApplicationAdapter {
public Double add(Double a, Double b) {
return a+b;
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
部署你的 webapp 时,你是否在 /YourRed5InstallPath/lib 下添加了所有外部 JAR?
看看 创建Red5Projects。
When deploy your webapp, have you add all external JARs under /YourRed5InstallPath/lib ?
Have a look at CreatingRed5Projects.