Red5 / red5-server

Red5 Server core
Apache License 2.0
3.34k stars 982 forks source link

red5 1.0.8 jdk 1.8 tomcat 8.0.4 devel system windows 64 wind StandardContext.startInternal #235

Closed 13539956066 closed 7 years ago

13539956066 commented 7 years ago

Software development environment

red5 1.0.8 jdk 1.8 tomcat 8.0.4 system windows7 64

ERROR :

[RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors

Flash Builder connect red5

ERROR :

[WARN] [NioProcessor-2] org.red5.io.object.Deserializer - Black list is not yet initialized [WARN] [RTMPConnectionExecutor-1] org.red5.server.net.rtmp.RTMPHandler - Scope n ot found org.red5.server.exception.ScopeNotFoundException: Scope not found: example in nu

13539956066 commented 7 years ago

INTELLIJ IDEA

maven

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

4.0.0 com.demo example war 1.0.8-SNAPSHOT example http://maven.apache.org 1.8 1.0.8-RELEASE D:/javaObj/example/red5-server.jar D:/javaObj/example/red5-io-1.0.8-RELEASE.jar D:/javaObj/example/red5-server-common-1.0.8-RELEASE.jar 4.3.5.RELEASE 4.3.5.RELEASE D:/javaObj/example/nls-service-sdk.jar D:/javaObj/example/opencv-320.jar 1.7.22 1.1.7 2.0.8 4.12 3.3.2 2.1 3.2.3 1.2.2 org.slf4j slf4j-api ${slf4j.version} junit junit ${junit.version} test org.hamcrest hamcrest-junit 2.0.0.0 test junit junit 3.8.1 compile org.hamcrest hamcrest-junit org.slf4j slf4j-api ${slf4j.version} org.slf4j jcl-over-slf4j ${slf4j.version} org.slf4j jul-to-slf4j ${slf4j.version} org.slf4j log4j-over-slf4j ${slf4j.version} ch.qos.logback logback-access ${logback.version} ch.qos.logback logback-core ${logback.version} ch.qos.logback logback-classic ${logback.version} cglib cglib-nodep 2.2.2 org.red5 red5-server ${red5.version} system ${red5.server} org.red5 red5-io ${red5.version} system ${red5.server.io} org.red5 red5-server-common ${red5.version} system ${red5.server.common} org.springframework spring-beans ${spring.version} org.springframework spring-context-support ${spring.version} commons-logging commons-logging org.springframework spring-context ${spring.version} commons-logging commons-logging org.springframework spring-core ${spring.version} commons-logging commons-logging org.springframework spring-expression ${spring.version} commons-logging commons-logging org.springframework spring-aop ${spring.version} org.springframework spring-web ${spring.version} org.springframework spring-webmvc ${spring.version} commons-logging commons-logging io.netty netty 3.7.0.Final nls-service nls-service-sdk 1.0 system ${nls-service-sdk} com.google.code.gson gson 2.3.1 javax.servlet servlet-api 2.5 org.apache.commons commons-lang3 ${commons.lang3.version} org.codehaus.jackson jackson-mapper-asl 1.8.8 org.apache.commons commons-dbcp2 ${commons.dbcp2.version} org.apache.commons commons-pool2 2.3 org.mybatis mybatis ${mybatis.version} org.mybatis mybatis-spring ${mybatis.spring.version} org.antlr stringtemplate 4.0.2 mysql mysql-connector-java 5.1.35 org.bytedeco.javacpp-presets opencv 3.1.0-1.3 org.bytedeco javacv 1.3.3 example org.apache.maven.plugins maven-eclipse-plugin 2.9 true false 2.0 org.apache.maven.plugins maven-compiler-plugin 3.3 ${jdk.version} ${jdk.version} maven-war-plugin 2.6 WEB-INF/lib/*.jar org.apache.maven.plugins maven-surefire-plugin 2.18.1 false

red5-web.xml

<?xml version="1.0" encoding="UTF-8" ?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd">

<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="location" value="/WEB-INF/red5-web.properties" />
</bean>
<bean id="web.context" class="org.red5.server.Context" autowire="byType" />
<bean id="web.scope" class="org.red5.server.scope.WebScope" init-method="register">
    <property name="server" ref="red5.server" />
    <property name="parent" ref="global.scope" />
    <property name="context" ref="web.context" />
    <property name="handler" ref="web.handler" />
    <property name="contextPath" value="${webapp.contextPath}" />
    <property name="virtualHosts" value="${webapp.virtualHosts}" />
</bean>
<bean id="web.handler" class="com.demo.Application" />

web.xml

<?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

example webAppRootKey /example org.red5.logging.ContextLoggingListener LoggerContextFilter org.red5.logging.LoggerContextFilter LoggerContextFilter /* gateway org.red5.server.net.servlet.AMFGatewayServlet 1 gateway /gateway Forbidden /streams/*

mondain commented 7 years ago

Update to the latest release or milestone; versions prior to 1.0.9 have be superseded.

13539956066 commented 7 years ago

Hello! I've already updated to the 1.0.9 version, and the flash Builder connection is still going wrong [WARN] [NioProcessor-2] org.red5.server.net.rtmp.RTMPHandler - Scope not found org.red5.server.exception.ScopeNotFoundException: Scope not found: example in null

red5-web.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd">

<bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="locations">
        <list>
            <value>/WEB-INF/red5-web.properties</value>
            <value>classpath:mybatis.properties</value>
        </list>
    </property>
</bean>
<!-- Defines the web context -->
<bean id="web.context" class="org.red5.server.Context" autowire="byType" />
<!-- Defines the web scopes -->
<bean id="web.scope" class="org.red5.server.scope.WebScope">
    <property name="server" ref="red5.server" />
    <property name="parent" ref="global.scope" />
    <property name="context" ref="web.context" />
    <property name="handler" ref="web.handler" />
    <property name="contextPath" value="${webapp.contextPath}" />
    <property name="virtualHosts" value="${webapp.virtualHosts}" />
</bean>

<!-- <bean id="web.handler" class="com.dialog.Dialogue" /> -->
<bean id="web.handler" class="com.video.Application" />
<import resource="classpath:spring-bean.xml" />
<!--  <import resource="classpath:spring-bean.xml" /> -->

com.video.Application

import java.util.*; import org.red5.server.adapter.ApplicationAdapter; import org.red5.server.api.IConnection; import org.red5.server.api.scope.IScope; import org.red5.server.api.stream.IServerStream;

public class Application extends ApplicationAdapter {

private IScope appScope;

private IServerStream serverStream;

/** {@inheritDoc} */
@Override
public boolean appStart(IScope app) {
    super.appStart(app);
    log.info("oflaDemo appStart");
    System.out.println("oflaDemo appStart");
    appScope = app;
    return true;
}

/** {@inheritDoc} */
@Override
public boolean appConnect(IConnection conn, Object[] params) {
    log.info("oflaDemo appConnect");

    return super.appConnect(conn, params);
}

/** {@inheritDoc} */
@Override
public void appDisconnect(IConnection conn) {
    log.info("oflaDemo appDisconnect");
    if (appScope == conn.getScope() && serverStream != null) {
        serverStream.close();
    }
    super.appDisconnect(conn);
}

}

There is a problem, very feel back

mondain commented 7 years ago

Scope not found means you dont have the scope you requested or it failed to start. I suggest turning up your logger to see where or how it may have failed to start up. Ensure that you are not using a Spring context loader in your web.xml.

13539956066 commented 7 years ago

Thank you for your reply. It was when I loaded mybatis-3 that there was a problem