# Missing function in custom module

**URL:** <https://community.wowza.com/t/missing-function-in-custom-module/33585>\
**Category:** Wowza Streaming Engine\
**Created:** [June 19, 2010, 9:55pm UTC](https://community.wowza.com/t/missing-function-in-custom-module/33585 "2010-06-19T21:55:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ozgur\_Orhan](https://avatars.discourse-cdn.com/v4/letter/o/f1d935/32.png) [@Ozgur\_Orhan](https://community.wowza.com/u/Ozgur_Orhan)\
**Post date:** [June 19, 2010, 9:55pm UTC](https://community.wowza.com/t/missing-function-in-custom-module/33585/1 "2010-06-19T21:55:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [June 19, 2010, 8:27pm UTC](https://community.wowza.com/t/missing-function-in-custom-module/33585/2 "2010-06-19T20:27:46Z")

</div>

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

```auto
public int ping(IModulePingResult pingResult)

```

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [June 19, 2010, 10:00pm UTC](https://community.wowza.com/t/missing-function-in-custom-module/33585/3 "2010-06-19T22:00:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [June 19, 2010, 10:19pm UTC](https://community.wowza.com/t/missing-function-in-custom-module/33585/4 "2010-06-19T22:19:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [June 19, 2010, 11:12pm UTC](https://community.wowza.com/t/missing-function-in-custom-module/33585/5 "2010-06-19T23:12:31Z")

</div>

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:

```auto
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:

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

```

Client-side call:

```auto
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

---

<div class="post-metadata">

**Author:** ![Ozgur\_Orhan](https://avatars.discourse-cdn.com/v4/letter/o/f1d935/32.png) [@Ozgur\_Orhan](https://community.wowza.com/u/Ozgur_Orhan)\
**Post date:** [June 19, 2010, 11:49pm UTC](https://community.wowza.com/t/missing-function-in-custom-module/33585/6 "2010-06-19T23:49:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ozgur\_Orhan](https://avatars.discourse-cdn.com/v4/letter/o/f1d935/32.png) [@Ozgur\_Orhan](https://community.wowza.com/u/Ozgur_Orhan)\
**Post date:** [June 19, 2010, 11:57pm UTC](https://community.wowza.com/t/missing-function-in-custom-module/33585/7 "2010-06-19T23:57:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ozgur\_Orhan](https://avatars.discourse-cdn.com/v4/letter/o/f1d935/32.png) [@Ozgur\_Orhan](https://community.wowza.com/u/Ozgur_Orhan)\
**Post date:** [June 20, 2010, 12:10am UTC](https://community.wowza.com/t/missing-function-in-custom-module/33585/8 "2010-06-20T00:10:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ozgur\_Orhan](https://avatars.discourse-cdn.com/v4/letter/o/f1d935/32.png) [@Ozgur\_Orhan](https://community.wowza.com/u/Ozgur_Orhan)\
**Post date:** [June 20, 2010, 12:44am UTC](https://community.wowza.com/t/missing-function-in-custom-module/33585/9 "2010-06-20T00:44:33Z")

</div>

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
