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.
Regards,
Salvadore
Thanks for answer!
the jar 100% is in lib folder! And some time it working
I think may be it from asynhron calls… the code is very simple
package com.wowza.wms.example;
import com.wowza.wms.httpstreamer.model.IHTTPStreamerSession;
import com.wowza.wms.module.*;
import com.wowza.wms.application.*;
public class ModuleAccessControlHTTPStreaming extends ModuleBase
{
public void onHTTPSessionCreate(IHTTPStreamerSession httpSession)
{
boolean isGood = true;
String ipAddressClient = "";
String ipAddressServer = "";
String queryStr = "";
String referrer = "";
String cookieStr= "";
String userAgent= "";
try {
userAgent = httpSession.getUserAgent();
ipAddressClient = httpSession.getIpAddress();
queryStr = httpSession.getQueryStr();
referrer = httpSession.getReferrer();
cookieStr = httpSession.getCookieStr();
ipAddressServer = httpSession.getServerIp();
final String YYY = "xxx";
referrer = referrer.trim();
String[] array = {"ForkPlayer", "Chrome", "LibVLC","MXPlayer","Winamp"};
if (referrer != null && !referrer.isEmpty()) {
isGood = checkReferrer(referrer, YYY);
if(!isGood){
isGood = checkReferrer(referrer, "zzzzzzzzz.zz");}
if(!isGood){
isGood = checkReferrer(referrer, "xxxxxxx");}
if(!isGood){
isGood = referrer.contains("xxxxxx");
}
} else if (userAgent != null && !userAgent.isEmpty()) {
if (checkReferrerArray(userAgent, array)) {
isGood = false;
}
}
if (!isGood) {
httpSession.redirectSession("http://xxx.xxx.xxx.xxx:xxxx/vod/mp4:BUY_ITV.mp4/playlist.m3u8");
}
}catch (Exception e) {
getLogger().info("Errorr!!! accept:"+isGood+" ipAddressClient:"+ipAddressClient+" queryStr:"+queryStr+" referrer:"+referrer+" useragent:"+userAgent);
httpSession.redirectSession("http://xxx.xxx.xxx.xxx:xxxx/vod/mp4:BUY_ITV.mp4/playlist.m3u8");
}
finally
{
getLogger().info("EModuleAccessControlHTTPStreaming.onHTTPSessionCreate[ ]: accept:"+isGood+" ipAddressClient:"+ipAddressClient+" queryStr:"+queryStr+" referrer:"+referrer+" useragent:"+userAgent);
}
}
private static boolean checkReferrer(String whom, String withWhom) {
return whom.contains(withWhom);
}
private static boolean checkReferrerArray(String referrer, String[] parameters) {
for (String item : parameters) {
if (referrer.contains(item)) {
return true;
}
}
return false;
}
}