I am trying to write a simple HelloWorld HTTPprovider (part of a project to enable communication between Wowza and my J2EE application, but that’s another post). I am able to write and build a simple HTTPprovider using a template similar to the other ones I have seen on this site. I place the jar file under /lib, place the proper configuration item in the VHost.xml file, and restart the server. Upon server start, I am getting the following error message in my wowzastreamingengine_access.log:
2015-02-03 16:25:20 CST comment server ERROR 500 - loadHTTPProvider: error parsing HTTPProvider properties : java.lang.ClassNotFoundException: com.bebloomin.wowza.BloomingHandler|at java.net.URLClassLoader$1.run(URLClassLoader.java:366)|at java.net.URLClassLoader$1.run(URLClassLoader.java:355)|at java.security.AccessController.doPrivileged(Native Method)|at java.net.URLClassLoader.findClass(URLClassLoader.java:354)|at java.lang.ClassLoader.loadClass(ClassLoader.java:424)| - - - 1.998
The following is my entire HTTPprovider class and the entry in my VHost.xml file:
package com.bebloomin.wowza;
import java.io.OutputStream;
import com.wowza.wms.logging.WMSLoggerFactory;
import com.wowza.wms.vhost.IVHost;
import com.wowza.wms.http.HTTProvider2Base;
import com.wowza.wms.http.IHTTPRequest;
import com.wowza.wms.http.IHTTPResponse;
public class BloomingHandler extends HTTProvider2Base{
public void onHTTPRequest(IVHost vhost, IHTTPRequest req, IHTTPResponse resp) {
if (!doHTTPAuthentication(vhost, req, resp)) { return; }
String ret = "Hello World!";
try {
OutputStream out = resp.getOutputStream();
byte[] outBytes = ret.getBytes();
out.write(outBytes);
} catch (Exception e) {
WMSLoggerFactory.getLogger(null).error(
"MediaCasterHTTP: " + e.toString());
}
}
}
<HTTPProvider>
<BaseClass>com.bebloomin.wowza.BloomingHandler</BaseClass>
<RequestFilters>testing*</RequestFilters>
<AuthenticationMethod>none</AuthenticationMethod>
</HTTPProvider>
Any help is appreciated. Thanks a lot, guys!