[Red5] red5.sh doesn't work ; red5_home not set or incorrect

Walter Tak walter at waltertak.com
Sun Sep 6 07:45:20 PDT 2009


I'd like to add this:

One thing I experienced a lot is that if you run multiple versions of Red5 next to each other (not perse simultaneous) then the RED5_HOME variable can be set by red5.sh (or red5.bat) the first it's run. If you'd stop that version of Red5 and then go back to 'another' version in the same sessions (shell or dos-box) then you'll get a nasty error:

E:\Progs\Red5\red5-0.9.0-build-hudson-red5_jdk6_stable-198>red5.bat
Starting Red5
Exception in thread "main" java.lang.NoClassDefFoundError: org/red5/server/Bootstrap
Caused by: java.lang.ClassNotFoundException: org.red5.server.Bootstrap
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: org.red5.server.Bootstrap.  Program will exit.

In that case make sure you set environmental variable RED5_HOME to the current directory ; on windows: "set red5_home=%CD%"

If the variable [red5_home] still was set to another version then you could end up with errors that are 3 pages long and give you no clue why they show up, all this thanks to wrong environmental variables.



  ----- Original Message ----- 
  From: Trevor Burton 
  To: red5 at osflash.org 
  Sent: Sunday, 06 September 2009 14:12
  Subject: Re: [Red5] red5.sh doesn't work


  hmmm, this doesn't look correct to me, i'm afraid...

  the svn url is correct, but once you've checked out a local working copy try 

  cd red5
  ant dist
  cd dist
  ./red5.sh

  this should move you into the directory you checked out into, build the server, which builds the red5.jar and then copies all the required directories, configs etc into the /dist directory. You can then move into the /dist directory and start the server with the red5.sh script.

  I never need to set my RED5_HOME environment variable as red5.sh contains a line which checks for that variable's presence, and uses the current directory if it's not set, so it'll default to the /dist directory when you're running from there....

  hth

  T


  On Sun, Sep 6, 2009 at 11:22 AM, Ben Tung <benpptung at tacol.biz> wrote:

    According to the link
    http://wiki.red5.org/wiki/Download#LatestDevelopmentSourceCode


    The latest revision of Red5 can be checked out with the following command:

svn co http://red5.googlecode.com/svn/java/server/trunk red5
For installing this development version:

cd red5
export RED5_HOME=`pwd`
./red5.sh


    It sounds very easy, but doesn't work. Is it out-dated ? the server is RedHat 5.2.
    I got the Exception in thread "main" java.lang.NoClassDefFountError: org/red5/server/Bootstrap Caused by : ......


    If it needs to use ant commands before ./red5.sh or any other commands, why doesn't anyone who know HOW TO DO IT to make it more correctly ? Because it seems the http://trac.red5.org/  is the "official" website of Red5 now. 


    Thanks for any help or response / Ben


    On Sun, Sep 6, 2009 at 4:59 PM, <red5-request at osflash.org> wrote:

      Send Red5 mailing list submissions to
             red5 at osflash.org

      To subscribe or unsubscribe via the World Wide Web, visit
             http://osflash.org/mailman/listinfo/red5_osflash.org
      or, via email, send a message with subject or body 'help' to
             red5-request at osflash.org

      You can reach the person managing the list at
             red5-owner at osflash.org

      When replying, please edit your Subject line so it is more specific
      than "Re: Contents of Red5 digest..."


      Today's Topics:

        1. Re: Debian / Redhat packages (Daniel Rossi)
        2.  Can't seem to get it to work... (woofie)
        3. Re: Can't seem to get it to work... (Daniel Rossi)
        4. Re: Debian / Redhat packages (Manuel Ra?a)
        5. Re: Can't seem to get it to work... (woofie)


      ----------------------------------------------------------------------

      Message: 1
      Date: Sun, 6 Sep 2009 17:42:23 +1000
      From: Daniel Rossi <electroteque at gmail.com>
      Subject: Re: [Red5] Debian / Redhat packages
      To: red5 at osflash.org
      Message-ID: <9ABFF48F-428F-4C67-92BD-6F518592B20F at gmail.com>
      Content-Type: text/plain; charset="us-ascii"; Format="flowed";
             DelSp="yes"

      Afaik it does not work because its not packaging up "boot.jar".

      root at beasty:/home/danielr# dpkg -i red5_0.9.0-RC1_all.deb
      Selecting previously deselected package red5.
      (Reading database ... 74696 files and directories currently installed.)
      Unpacking red5 (from red5_0.9.0-RC1_all.deb) ...
      Setting up red5 (0.9.0-RC1) ...
      update-rc.d: warning: /etc/init.d/red5 missing LSB information
      update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
      Starting Red5 flash streaming server: red5.



      root at beasty:/usr/lib/red5# ./red5.sh
      Starting Red5
      Exception in thread "main" java.lang.NoClassDefFoundError: org/red5/
      server/Bootstrap
      Caused by: java.lang.ClassNotFoundException: org.red5.server.Bootstrap
             at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
             at java.security.AccessController.doPrivileged(Native Method)
             at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
             at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
             at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
             at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
             at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      Could not find the main class: org.red5.server.Bootstrap.  Program
      will exit.

      On 06/09/2009, at 4:28 PM, Mondain wrote:

      > Excellent idea, I for one dont know how to set that up.. I also dont
      > understand why the "deb" I made doesnt work? should we take it down?
      >
      > Paul
      >
      > On Sat, Sep 5, 2009 at 10:45 PM, Daniel Rossi
      > <electroteque at gmail.com> wrote:
      > Just wondering if its possible we setup on the trac site, an apt /
      > rpm sources url for debian and redhat, therefore all people have to
      > do is add the repository url to their apt / yum sources list or
      > whatever and run apt-get install red5-server or even some funkier
      > things like apt-get install red5-client, apt-get install red5-tools
      > or whatever as well as apt-get upgrade red5-server.
      >
      > Let me know !
      >
      >
      > _______________________________________________
      > Red5 mailing list
      > Red5 at osflash.org
      > http://osflash.org/mailman/listinfo/red5_osflash.org
      >
      >
      >
      > --
      > http://gregoire.org/
      > http://code.google.com/p/red5/
      > http://code.google.com/p/blue5/
      > _______________________________________________
      > Red5 mailing list
      > Red5 at osflash.org
      > http://osflash.org/mailman/listinfo/red5_osflash.org

      -------------- next part --------------
      An HTML attachment was scrubbed...
      URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20090906/df43d31c/attachment-0001.html>

      ------------------------------

      Message: 2
      Date: Sun, 6 Sep 2009 00:44:32 -0700 (PDT)
      From: woofie <royfredj at gmail.com>
      Subject: [Red5]  Can't seem to get it to work...
      To: Red5 at osflash.org
      Message-ID: <25315349.post at talk.nabble.com>
      Content-Type: text/plain; charset=us-ascii


      So I installed the red5 plugin on eclipse-ganymede, used the red5 application
      generator, and then published the app to the server. Thing is, when I try to
      connect to the app, it doesn't connect. Used the red5 publisher demo and its
      says "InvalidApp". Can anybody help?
      --
      View this message in context: http://www.nabble.com/Can%27t-seem-to-get-it-to-work...-tp25315349p25315349.html
      Sent from the Red5 - English mailing list archive at Nabble.com.




      ------------------------------

      Message: 3
      Date: Sun, 6 Sep 2009 17:53:29 +1000
      From: Daniel Rossi <electroteque at gmail.com>
      Subject: Re: [Red5] Can't seem to get it to work...
      To: red5 at osflash.org
      Message-ID: <5A917045-4762-4459-950D-2274B6D8124D at gmail.com>
      Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes

      does it load  http://localhost:5080/yourapp ?

      Any errors in the logs.

      On 06/09/2009, at 5:44 PM, woofie wrote:

      >
      > So I installed the red5 plugin on eclipse-ganymede, used the red5
      > application
      > generator, and then published the app to the server. Thing is, when
      > I try to
      > connect to the app, it doesn't connect. Used the red5 publisher demo
      > and its
      > says "InvalidApp". Can anybody help?
      > --
      > View this message in context: http://www.nabble.com/Can%27t-seem-to-get-it-to-work...-tp25315349p25315349.html
      > Sent from the Red5 - English mailing list archive at Nabble.com.
      >
      >
      > _______________________________________________
      > Red5 mailing list
      > Red5 at osflash.org
      > http://osflash.org/mailman/listinfo/red5_osflash.org




      ------------------------------

      Message: 4
      Date: Sun, 6 Sep 2009 10:00:52 +0200
      From: Manuel Ra?a <info at vengava.com>
      Subject: Re: [Red5] Debian / Redhat packages
      To: red5 at osflash.org
      Message-ID:
             <d41d8d250909060100k50f24903n8e6319e68fa68b69 at mail.gmail.com>
      Content-Type: text/plain; charset="utf-8"

      Yes, i believe boot.jar should be added to
      http://red5.googlecode.com/svn/java/server/trunk/Makefile under "installer"
      section


      2009/9/6 Daniel Rossi <electroteque at gmail.com>

      > Afaik it does not work because its not packaging up "boot.jar".
      > root at beasty:/home/danielr# dpkg -i red5_0.9.0-RC1_all.deb
      > Selecting previously deselected package red5.
      > (Reading database ... 74696 files and directories currently installed.)
      > Unpacking red5 (from red5_0.9.0-RC1_all.deb) ...
      > Setting up red5 (0.9.0-RC1) ...
      > update-rc.d: warning: /etc/init.d/red5 missing LSB information
      > update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
      > Starting Red5 flash streaming server: red5.
      >
      >
      >
      > root at beasty:/usr/lib/red5# ./red5.sh
      > Starting Red5
      > Exception in thread "main" java.lang.NoClassDefFoundError:
      > org/red5/server/Bootstrap
      > Caused by: java.lang.ClassNotFoundException: org.red5.server.Bootstrap
      > at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      > at java.security.AccessController.doPrivileged(Native Method)
      > at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      > at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      > at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      > Could not find the main class: org.red5.server.Bootstrap.  Program will
      > exit.
      >
      > On 06/09/2009, at 4:28 PM, Mondain wrote:
      >
      > Excellent idea, I for one dont know how to set that up.. I also dont
      > understand why the "deb" I made doesnt work? should we take it down?
      > Paul
      >
      > On Sat, Sep 5, 2009 at 10:45 PM, Daniel Rossi <electroteque at gmail.com>wrote:
      >
      >> Just wondering if its possible we setup on the trac site, an apt / rpm
      >> sources url for debian and redhat, therefore all people have to do is add
      >> the repository url to their apt / yum sources list or whatever and run
      >> apt-get install red5-server or even some funkier things like apt-get install
      >> red5-client, apt-get install red5-tools or whatever as well as apt-get
      >> upgrade red5-server.
      >>
      >> Let me know !
      >>
      >>
      >> _______________________________________________
      >> Red5 mailing list
      >> Red5 at osflash.org
      >> http://osflash.org/mailman/listinfo/red5_osflash.org
      >>
      >
      >
      >
      > --
      > http://gregoire.org/
      > http://code.google.com/p/red5/
      > http://code.google.com/p/blue5/
      >  _______________________________________________
      > Red5 mailing list
      > Red5 at osflash.org
      > http://osflash.org/mailman/listinfo/red5_osflash.org
      >
      >
      >
      > _______________________________________________
      > Red5 mailing list
      > Red5 at osflash.org
      > http://osflash.org/mailman/listinfo/red5_osflash.org
      >
      >
      -------------- next part --------------
      An HTML attachment was scrubbed...
      URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20090906/e8f43721/attachment-0001.html>

      ------------------------------

      Message: 5
      Date: Sun, 6 Sep 2009 01:59:07 -0700 (PDT)
      From: woofie <royfredj at gmail.com>
      Subject: Re: [Red5] Can't seem to get it to work...
      To: Red5 at osflash.org
      Message-ID: <25315775.post at talk.nabble.com>
      Content-Type: text/plain; charset=us-ascii


      Exception in thread "Launcher:/testingapp"
      org.springframework.beans.factory.UnsatisfiedDependencyException: Error
      creating bean with name 'web.context' defined in ServletContext resource
      [/WEB-INF/red5-web.xml]: Unsatisfied dependency expressed through bean
      property 'clientRegistry': : Error loading class [org.red5.core.Application]
      for bean with name 'web.handler' defined in ServletContext resource
      [/WEB-INF/red5-web.xml]: problem with class file or dependent class; nested
      exception is java.lang.NoClassDefFoundError: IStreamAwareScopeHandler;
      nested exception is
      org.springframework.beans.factory.CannotLoadBeanClassException: Error
      loading class [org.red5.core.Application] for bean with name 'web.handler'
      defined in ServletContext resource [/WEB-INF/red5-web.xml]: problem with
      class file or dependent class; nested exception is
      java.lang.NoClassDefFoundError: IStreamAwareScopeHandler
             at
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1091)
             at
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:982)
             at
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
             at
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
             at java.security.AccessController.doPrivileged(Native Method)
             at
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
             at
      org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
             at
      org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
             at
      org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
             at
      org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
             at
      org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
             at
      org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
             at
      org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
             at
      org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
             at org.red5.server.tomcat.TomcatLoader$1.run(TomcatLoader.java:539)
      Caused by: org.springframework.beans.factory.CannotLoadBeanClassException:
      Error loading class [org.red5.core.Application] for bean with name
      'web.handler' defined in ServletContext resource [/WEB-INF/red5-web.xml]:
      problem with class file or dependent class; nested exception is
      java.lang.NoClassDefFoundError: IStreamAwareScopeHandler
             at
      org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1144)
             at
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
             at
      org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
             at
      org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:222)
             at
      org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:187)
             at
      org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:652)
             at
      org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:610)
             at
      org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1076)
             ... 14 more
      Caused by: java.lang.NoClassDefFoundError: IStreamAwareScopeHandler
             at java.lang.ClassLoader.defineClass1(Native Method)
             at java.lang.ClassLoader.defineClass(Unknown Source)
             at java.security.SecureClassLoader.defineClass(Unknown Source)
             at
      org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
             at
      org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
             at
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
             at
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
             at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)
             at
      org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)
             at
      org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
             ... 21 more
      Caused by: java.lang.ClassNotFoundException: IStreamAwareScopeHandler
             at
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
             at
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
             at java.lang.ClassLoader.loadClassInternal(Unknown Source)
             ... 31 more

      thats the error in the logs. and i cant load it from
      localhost:5080/testingapp

      Daniel Rossi wrote:
      >
      > does it load  http://localhost:5080/yourapp ?
      >
      > Any errors in the logs.
      >
      > On 06/09/2009, at 5:44 PM, woofie wrote:
      >
      >>
      >> So I installed the red5 plugin on eclipse-ganymede, used the red5
      >> application
      >> generator, and then published the app to the server. Thing is, when
      >> I try to
      >> connect to the app, it doesn't connect. Used the red5 publisher demo
      >> and its
      >> says "InvalidApp". Can anybody help?
      >> --
      >> View this message in context:
      >> http://www.nabble.com/Can%27t-seem-to-get-it-to-work...-tp25315349p25315349.html
      >> Sent from the Red5 - English mailing list archive at Nabble.com.
      >>
      >>
      >> _______________________________________________
      >> Red5 mailing list
      >> Red5 at osflash.org
      >> http://osflash.org/mailman/listinfo/red5_osflash.org
      >
      >
      > _______________________________________________
      > Red5 mailing list
      > Red5 at osflash.org
      > http://osflash.org/mailman/listinfo/red5_osflash.org
      >
      >

      --
      View this message in context: http://www.nabble.com/Can%27t-seem-to-get-it-to-work...-tp25315349p25315775.html
      Sent from the Red5 - English mailing list archive at Nabble.com.




      ------------------------------

      _______________________________________________
      Red5 mailing list
      Red5 at osflash.org
      http://osflash.org/mailman/listinfo/red5_osflash.org


      End of Red5 Digest, Vol 49, Issue 21
      ************************************




    _______________________________________________
    Red5 mailing list
    Red5 at osflash.org
    http://osflash.org/mailman/listinfo/red5_osflash.org





  -- 
  Trevor Burton
  http://www.flashmonkey.org
  http://www.infrared5.com



------------------------------------------------------------------------------


  _______________________________________________
  Red5 mailing list
  Red5 at osflash.org
  http://osflash.org/mailman/listinfo/red5_osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20090906/9e6d8023/attachment-0001.html>


More information about the Red5 mailing list