# InvocationTargetException in attempt invoke methods onConnect,onStreamCreate in modul

**URL:** <https://community.wowza.com/t/invocationtargetexception-in-attempt-invoke-methods-onconnect-onstreamcreate-in-modul/43993>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [September 23, 2014, 11:40pm UTC](https://community.wowza.com/t/invocationtargetexception-in-attempt-invoke-methods-onconnect-onstreamcreate-in-modul/43993 "2014-09-23T23:40:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ar\_Ba](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@Ar\_Ba](https://community.wowza.com/u/Ar_Ba)\
**Post date:** [September 23, 2014, 11:40pm UTC](https://community.wowza.com/t/invocationtargetexception-in-attempt-invoke-methods-onconnect-onstreamcreate-in-modul/43993/1 "2014-09-23T23:40:44Z")

</div>

I install Wowza 4.1.0 Trial, on server : Win 8 x64, jdk1.8.0\_20

I wrote the module and added to application. Wowza is launched without errors.

When I launch a stream on client some module methods are called without errors, but some methods aren’t called and logs there are errors:

```auto
2014-09-24	12:47:35	YEKT	comment	server	ERROR	500	-	invoke(onConnect): java.lang.reflect.InvocationTargetException|at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)|at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)|at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)|at java.lang.reflect.Method.invoke(Method.java:483)|at com.wowza.wms.module.ModuleFunction.invoke(ModuleFunction.java:369)|	_defaultVHost_	cams	_definst_	14.117

```

```auto
2014-09-24	12:47:35	YEKT	comment	server	ERROR	500	-	invoke(onStreamCreate): java.lang.reflect.InvocationTargetException|at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)|at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)|at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)|at java.lang.reflect.Method.invoke(Method.java:483)|at com.wowza.wms.module.ModuleFunction.invoke(ModuleFunction.java:383)|	-	-	-	14.159

```

Signature methods in my module:

```auto
public void onConnect(com.wowza.wms.client.IClient iClient, com.wowza.wms.request.RequestFunction requestFunction, com.wowza.wms.amf.AMFDataList amfDataList) {...
public void onStreamCreate(IMediaStream stream) {...

```

Thanks for your time!

---

<div class="post-metadata">

**Author:** ![Andrew\_Kennedy1](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Andrew\_Kennedy1](https://community.wowza.com/u/Andrew_Kennedy1)\
**Post date:** [September 26, 2014, 1:01am UTC](https://community.wowza.com/t/invocationtargetexception-in-attempt-invoke-methods-onconnect-onstreamcreate-in-modul/43993/2 "2014-09-26T01:01:08Z")

</div>

Hi,

This kind of error indicates the compiled jar file is not in the lib/ folder of your Wowza Streaming Engine install, or possibly anything it may rely on to work correctly.

What I would do is strip down the module to a bare minimum and get that working then add back any code to see if/how/when it fails.

Andrew.
