Search code examples
javaantcompiler-errorsspring-securityred5

Trying to build a sample Red5 Secure project but it fails because of some dependencies


I found this tutorial: http://blog.infrared5.com/2012/05/red5-authentication/ and tried to build it. I use netbeans and created a freeform project on the "server" directory. Everything went well but the build faild becuse it couldn't download some Spring framework libraries (security acl, config and core). I found them manually, downloaded the same version it needed (3.0.7). This error went away but changed to some Java compile-time errors. :-(

For example:

Compiling 6 source files to /Users/ist1/Downloads/red5-auth/server/www/WEB-INF/classes /Users/ist1/Downloads/red5-auth/server/src/org/red5/demo/auth/AggregatedUserDetailsService.java:29: package org.springframework.security.core.userdetails does not exist import org.springframework.security.core.userdetails.UserDetails; /Users/ist1/Downloads/red5-auth/server/src/org/red5/demo/auth/AggregatedUserDetailsService.java:30: package org.springframework.security.core.userdetails does not exist import org.springframework.security.core.userdetails.UserDetailsService; /Users/ist1/Downloads/red5-auth/server/src/org/red5/demo/auth/AggregatedUserDetailsService.java:31: package org.springframework.security.core.userdetails does not exist import org.springframework.security.core.userdetails.UsernameNotFoundException; /Users/ist1/Downloads/red5-auth/server/src/org/red5/demo/auth/AggregatedUserDetailsService.java:38: cannot find symbol symbol: class UserDetailsService public class AggregatedUserDetailsService implements UserDetailsService, ApplicationContextAware { /Users/ist1/Downloads/red5-auth/server/src/org/red5/demo/auth/AggregatedUserDetailsService.java:47: cannot find symbol symbol : class UserDetails location: class org.red5.demo.auth.AggregatedUserDetailsService public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException {

What should I do now? I'm quite new in Red5 and haven't used Java for a long time ago.


Solution

  • I would recomend to use Eclipse as the examples are build with it. If you got that running you can still migrate your project to Netbeans.

    Did you successfully set up a new Project with Red5 in Eclipse/Netbeans and build that before? The Tutorial requires to set up a basic project to get started. What you try to complete is actually a sample project (that might have very little use for you practically)

    Actually if you followed the 3 initial points:

    • Create a new red5 project
    • Import project into Eclipse
    • Create an application adapter

    You got already your Red5 webapp. No need to follow the rest of the guide if you do not need especially this auth mechanism.

    There are also a couple of demo applications with source code in their SVN. Maybe those are also a good way to get started.

    Sebastian