Wowza Community

Failing to Load Class from HTTPprovider Jar

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!

Hello there and welcome to the Wowza support forum.

Is it possible that you have multiple versions of Wowza installed, and that the .jar file is located in one version’s /lib folder, while you are starting a second Wowza version?

Please confirm the .jar file is located in the /lib folder of the Wowza version you are running.

Thank you,

Salvadore

Hi,

If you are running wowza from eclipse or another ide then it won’t be using the class path it normally uses when running normally. Instead, it will be using the class path that is defined in the eclipse debug or run configuration. Check to make sure that class path is correct and includes your custom jar files.

You can also get the same error if the class doesn’t build properly.

-Roger.

Is it possible that you have multiple versions of Wowza installed, and that the .jar file is located in one version’s /lib folder, while you are starting a second Wowza version?

Please confirm the .jar file is located in the /lib folder of the Wowza version you are running.

Salvadore, I only have one Wowza installation in my Applications and Library directories, and this is the only version of Wowza I have ever installed. As for the jar being in the lib, it certainly looks like it is there (sorry, adding images is not working for me here, but here is the link to my evidence): http://i.imgur.com/xxKBNaT.png