Results 1 to 4 of 4

Thread: Failing to Load Class from HTTPprovider Jar

  1. #1
    Join Date
    Feb 2015
    Posts
    2

    Default 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 <wowza>/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!

  2. #2

    Default

    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

  3. #3
    Join Date
    Feb 2015
    Posts
    2

    Default

    Quote Originally Posted by salvadore View Post
    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

  4. #4

    Default

    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.

Similar Threads

  1. HTTPProvider works from Eclipse, not from .JAR
    By mjanderson235 in forum Wowza Streaming Server Java API
    Replies: 3
    Last Post: 01-31-2015, 08:08 AM
  2. HTTPProvider error - Module class not loaded....
    By fly135 in forum Wowza Streaming Server Java API
    Replies: 5
    Last Post: 10-07-2014, 09:33 AM
  3. Replies: 7
    Last Post: 05-29-2013, 09:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •