[Red5] All of a sudden no custom classes...?

Christopher Walzl cwalzl at gmail.com
Fri Sep 26 12:16:59 PDT 2008


Haha, no problem.  Great news!

I've been pretty excited about how active this Red5 community is.   
I've just started developing with it, and hope to continue with it in  
the future! Great work on Red5 guys & gals!

-Chris

Chris Walzl
cwalzl at gmail.com
(972) 974-6728

Sent from my MacBook Pro

On Sep 26, 2008, at 2:01 PM, Trevor Burton wrote:

> Thanks Chris, i just removed the IExternalizable interface stuff and  
> it works!
>
> after you mentioned that you didn't use any of that i thought i'd  
> give it a try.
>
> Paul, is this right? If so, how come it was working earlier today?
>
> weird, still as long as it's working.
>
> Chris, thank you very much for responding... i was getting to the  
> edge of my nerves there, the dog has left the room in disgust at my  
> language :P
>
> T
>
> On Fri, Sep 26, 2008 at 7:54 PM, Christopher Walzl  
> <cwalzl at gmail.com> wrote:
> Did you up the logging in logback.xml?  There are various properties  
> in there with either a setting of "DEBUG" "INFO" or "ERROR" I  
> think.  Changing them to "DEBUG" may provide more information...
>
>
> Chris Walzl
> cwalzl at gmail.com
> (972) 974-6728
>
> Sent from my MacBook Pro
>
> On Sep 26, 2008, at 1:47 PM, Trevor Burton wrote:
>
>> i've tried setting up a simple example using Paul's example
>>
>> http://gregoire.org/2008/09/12/using-custom-objects-in-amf3-with- 
>> red5/
>>
>> and it doesn't work either... this is really frustrating - i've  
>> uninstalled/reinstalled Red5 and still doesn't work.
>>
>> if i adjust paul's server side method to this.
>>
>> public MyClass getMyObject(MyClass param) {
>> 		MyClass myObj = new MyClass();
>> 		myObj.setL(1L);
>> 		myObj.setX(42);
>> 		myObj.setB((byte) 1);
>> 		myObj.setBool(true);
>> 	        myObj.setStr("The quick brown fox");
>> 		return myObj;
>> 	    }
>>
>> it returns null.
>>
>> if i change the netconnection call to
>>
>> connection.call( "getMyObject", resp, new MyClass() );
>>
>> it fails again, silently...
>>
>> i'm using flash for this - but am registering the class with
>>
>> registerClassAlias('org.red5.core.MyClass', MyClass );
>>
>> and that path is correct. And this is how i was doing it when it  
>> was working....
>>
>> T
>>
>> On Fri, Sep 26, 2008 at 7:31 PM, Trevor Burton <worldofpaper at googlemail.com 
>> > wrote:
>> not sure exactly how you're doing it Christopher, but your Red5 app  
>> needs to be aware of the class yes....
>>
>> I've tried making a simple example to show it failing....
>>
>> client side as looks like this:
>>
>> package
>> {
>> 	import flash.utils.IDataInput;
>> 	import flash.utils.IDataOutput;
>> 	import flash.utils.IExternalizable;	
>>
>> 	public class MyClass implements IExternalizable
>> 	{
>> 		public var p : String = "100";
>>
>> 		public function MyClass()
>> 		{
>> 		}
>>
>> 		public function readExternal(input : IDataInput) : void
>> 		{
>> 			p = input.readUTF( );
>> 		}
>>
>> 		public function writeExternal(output : IDataOutput) : void
>> 		{
>> 			output.writeUTF( p );
>> 		}
>> 	}
>> }
>>
>> server side class looks like this:
>>
>> package org.red5.core;
>>
>> import org.red5.io.amf3.IDataInput;
>> import org.red5.io.amf3.IDataOutput;
>> import org.red5.io.amf3.IExternalizable;
>>
>> public class MyClass implements IExternalizable {
>>
>> 	public String string = "";
>> 	
>> 	public MyClass() {
>> 		
>> 	}
>> 	
>> 	public void readExternal(IDataInput input) {
>> 		string = input.readUTF();
>> 	}
>>
>> 	public void writeExternal(IDataOutput output) {
>> 		output.writeUTF(string);
>> 	}
>>
>> }
>>
>> and in an otherwise empty Application class i have this method
>>
>> public MyClass echo(MyClass myClass)
>> {
>> 	return myClass;
>> }
>>
>> and nothing happens... like i say, earlier today i had much more  
>> complex examples all working... now something as basic as this is  
>> failing and failing silently...
>>
>> T
>>
>> On Fri, Sep 26, 2008 at 7:24 PM, Christopher Walzl  
>> <cwalzl at gmail.com> wrote:
>> Hi Trevor,
>>
>> I recently had trouble with custom classes as well.  I'm probably  
>> doing it the wrong way, but my solution was to include that custom  
>> class as apart of the red5 application.
>>
>> For example, I have a webapp called "testServer" and it has a  
>> "classes" directory - I added the compiled custom .class files to  
>> this directory(within a diretory structure that matches the package  
>> statement).
>>
>> If it's possible to send custom classes over the wire to red5  
>> without it having access to the actual .class files, I'd love to  
>> hear about it!
>>
>> Good luck!
>>
>> Chris Walzl
>> cwalzl at gmail.com
>> (972) 974-6728
>>
>> Sent from my MacBook Pro
>>
>> On Sep 26, 2008, at 1:06 PM, Trevor Burton wrote:
>>
>>> Been working on a Red5 project this afternoon.
>>>
>>> Everything was working fine until all of sudden Red5 fails when i  
>>> try and send a custom class over the wire.
>>>
>>> nothing has changed, classes implement IExternalizable etc. etc.  
>>> it was working, i restarted then it wasn't....
>>>
>>> i can't see what the problem is here, the console shows nothing,  
>>> it doesn't try to load the custom class or anything. just nothing.
>>>
>>> has anyone encountered anything similar, or can anyone suggest a  
>>> place to start trying to track this problem down, i've spent  
>>> nearly 4 hours here trying to work out what's causing it and i'm  
>>> no closer than i was when i started. :(
>>>
>>> -- 
>>> Trevor Burton
>>> http://www.paperworld3d.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
>>
>>
>>
>>
>> -- 
>> Trevor Burton
>> http://www.paperworld3d.com
>>
>>
>>
>> -- 
>> Trevor Burton
>> http://www.paperworld3d.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
>
>
>
>
> -- 
> Trevor Burton
> http://www.paperworld3d.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/20080926/703f8c1c/attachment-0001.html 


More information about the Red5 mailing list