[Red5] Bug or Stupidity: SharedObject.getStatistics() throws exception
Thomas Auge
auge at virtues.net
Tue Nov 20 07:54:11 PST 2007
To answer my own question (again): This happens if the shared object
does not exist. It's only supposed to be created if sos.getSharedObject
is called with the third parameter (persistent or not).
Thomas Auge wrote:
> Hi all,
>
> This function:
>
> public int numClients(String soname)
> {
> Red5 r5 = new Red5();
> IScope scope = r5.getScope();
> ISharedObjectService sos = new SharedObjectService();
> ISharedObject so = sos.getSharedObject(scope, soname);
> ISharedObjectStatistics sostat = so.getStatistics();
> return sostat.getActiveListeners();
> }
>
>
> Gets me this exception:
>
> [ERROR] 2007-11-20 16:20:54,304 pool-3-thread-7:(
> org.red5.server.service.ServiceInvoker.invoke ) Error executing call:
> Service: null Met
> hod: numClients Num Params: 10: VAGallg
> [ERROR] 2007-11-20 16:20:54,304 pool-3-thread-7:(
> org.red5.server.service.ServiceInvoker.invoke ) Service invocation error
> java.lang.reflect.InvocationTargetException
> at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.red5.server.service.ServiceInvoker.invoke(ServiceInvoker.java:217)
> at
> org.red5.server.service.ServiceInvoker.invoke(ServiceInvoker.java:123)
> at
> org.red5.server.net.rtmp.RTMPHandler.invokeCall(RTMPHandler.java:163)
> at
> org.red5.server.net.rtmp.RTMPHandler.onInvoke(RTMPHandler.java:431)
> at
> org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHandler.java:143)
> at
> org.red5.server.net.rtmp.RTMPMinaIoHandler.messageReceived(RTMPMinaIoHandler.java:120)
> at
> org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:570)
> at
> org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
> at
> org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
> at
> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
> at
> org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
> at
> org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.NullPointerException
> at org.red5.camChat.Application.numClients(Application.java:156)
> ... 18 more
>
>
>
> Line 156 is "ISharedObjectStatistics sostat = so.getStatistics();".
> Using 0.6.3 with JDK 1.6.0_05
>
> Is it me or is this a bug?
>
> Thanks,
>
> Thomas
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
More information about the Red5
mailing list