我在Ubuntu 12.04上安装了red5服务器。我下载Red5-0.9.1,运行red5.sh,索引页面正常工作。演示SOSample(BallControl.html)也在运行。
然而,演示oflaDemo失败了。似乎没有安装Java Spring Framework?日志如下:
[INFO] [Launcher:/oflaDemo] org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4ab84c: defining beans [placeholderConfig,web.context,web.scope,web.handler,demoService.service,org.springframework.scripting.support.ScriptFactoryPostProcessor#0]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@37165f
Exception in thread "Launcher:/oflaDemo" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.scripting.support.ScriptFactoryPostProcessor#0' defined in ServletContext resource [/WEB-INF/red5-web.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:946)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:890)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:671)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:401)
at org.red5.server.tomcat.TomcatLoader$1.run(TomcatLoader.java:594)
Caused by: java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2416)
at java.lang.Class.getConstructor0(Class.java:2726)
at java.lang.Class.getDeclaredConstructor(Class.java:2004)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:64)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:938)
... 10 more
Caused by: java.lang.ClassNotFoundException: org.aopalliance.aop.Advice
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 16 more
之前有人看到此错误吗?我不知道现在应该安装哪个软件包。谢谢你的建议!
答案 0 :(得分:0)
好像你错过了一些jar文件
你能在[red5服务器路径] / lib或app lib中找到两个jar:'spring-aop-x.x.x.jar'和'aopalliance-x.x.jar'吗?
或者您可以尝试将“RED5_HOME”添加到您的环境变量
答案 1 :(得分:0)
最后我运行了red5-1.0.0并且运行正常。我为Red5-0.9.1尝试了很多方法,都失败了..