Wowza Community

Missing function in custom module

Hello,

I have problem calling my defined functions inside a module, while all other methods are called as you can see from out, I cant call “ping” method.

Here is a part of java code :

public void ping(IClient client, RequestFunction function, AMFDataList params) {

getLogger().info( client.getClientId() + “: [Custom module] ping”);

sendResult(client, params, “pong”);

}

public void onAppStart(IApplicationInstance appInstance) {

getLogger().info("[Custom module] onAppStart ");

}

public void onAppStop(IApplicationInstance appInstance) {

getLogger().info("[Custom module] onAppStop ");

}

public void onConnect(IClient client, RequestFunction function,

AMFDataList params) {

getLogger().info("[Custom module] onConnect: " + client.getClientId());

}

Here is the console output:

INFO server comment - [Custom module] onAppStart

INFO application app-start definst vod/definst

INFO session connect-pending 127.0.0.1 -

INFO server comment - [Custom module] onConnect: 76184548

INFO session connect 127.0.0.1 -

INFO server comment - [Custom module] onConnectAccept: 76184548

INFO server comment - [Custom module] onStreamCreate: 1

INFO stream create - -

WARN server comment - Missing function: ping

INFO stream destroy - -

INFO session disconnect 76184548 -

INFO server comment - [Custom module] onDisconnect: 76184548

Anyone have any idea what the problem might be ? (I rechecked config file and doesnt seem to be any problem there).

Thanks for your help

I think the problem is that “ping” exists already. It is a method of IClient.

public int ping(IModulePingResult pingResult)

Richard

Usually means that the Module is not references in the Application.xml or the jar file is not in lib. But you have are calling other functions in this module?

Richard

You are compiling this in Wowza IDE?

Does this file exist?:

[wowza-install-dir]/lib/YourProjectName.jar

What is the package path and name of the Module?

Show the Application.xml

Richard

First, my earlier idea is wrong, there is no problem with the function name “ping”. Sorry for the mislead. Your problem is something simple, a typo maybe, wrong package path, or wrong location of Application.xml

Here’s a very minimal example:

package com.wowza.wms.example.module;
import com.wowza.wms.amf.*;
import com.wowza.wms.application.*;
import com.wowza.wms.client.*;
import com.wowza.wms.module.*;
import com.wowza.wms.request.*;
public class ModulePingExample extends ModuleBase {
	public void ping(IClient client, RequestFunction function,
			AMFDataList params) {
		getLogger().info("ping");
	}
}

The Application.xml Module:

<Module>
	<Name>Ping</Name>
	<Description>ping</Description>
	<Class>com.wowza.wms.example.module.ModulePingExample</Class>
</Module> 

Client-side call:

netconnection.call("ping",null);

Check everything over. Check the location of the Application.xml. Should be:

/conf/[pingApp]/Application.xml

Check the connection:

rtmp://[wowza-address]/[pingApp]

Richard

thanks for the quick reply, I will check it right ahead

public void pingCustom(IClient client, RequestFunction function, AMFDataList params) {

getLogger().info( client.getClientId() + “: [Custom module] ping”);

sendResult(client, params, “pong”);

}

INFO server comment - [Custom module] onConnect: 1200403944

INFO session connect 127.0.0.1 -

INFO server comment - [Custom module] onConnectAccept: 1200403944

INFO server comment - [Custom module] onStreamCreate: 1

INFO stream create - -

WARN server comment - Missing function: pingCustom

still getting the same error, and dont have any clue why would it happen.

all those [custom module] calls are in the same module, and I rechecked Application.xml in my conf/app folder. The problem is while all the “predefined” methods are working like a charm the only method I wrote inside the module gives a “missing function” warning and does’nt work. I am pretty much confused about this. The thing I suspect is there are other classes (Modules extends from ModuleBase) in jar file, but I only gave reference to this specific Dummy Module. I am gonna start a new empty project and give it another try.

I am compiling in Wowza IDE. File exists. (lib/EfabWowzaModules.jar)

Here is the module definition part :

base

Base

com.wowza.wms.module.ModuleCore

properties

Properties

com.wowza.wms.module.ModuleProperties

logging

Client Logging

com.wowza.wms.module.ModuleClientLogging

flvplayback

FLVPlayback

com.wowza.wms.module.ModuleFLVPlayback

TestModule

TestModule

com.efab.wowza.TestModule