Wowza Community

java.lang.ClassNotFoundException

I have freshly installed Java SE and Wowza 1.3.1. I have copied mymodules.jar from a working system to this new system. Also all configuration is the same. But when I try to connect, Wowza gives the following error: java.lang.ClassNotFoundException: com.adv.wms.module.ModuleEvents

What can be the problem. I appreciate your help.

Thanks,

Ibrahim ULUDAG

Configure logging: file:///C:/Program Files/Wowza Media Systems/Wowza Media Serv

er Pro 1.3.1/conf/log4j.properties

INFO server server-start Wowza Media Server Pro Evaluation License 1.3.1 build47

44 -

INFO server comment - Serial number: XXXXX-XXXXX-XXXXX-XXXXX-XW3CG

INFO server comment - Maximum connections: Unlimited

INFO server comment - Hardware Available Processors: 8

INFO server comment - Max File Descriptor Count: Unlimited

INFO server comment - OS Name: Windows 2003

INFO server comment - OS version: 5.2

INFO server comment - OS architecture: x86

INFO server comment - Java vendor: Sun Microsystems Inc.

INFO server comment - Java version: 1.6.0_03

INFO server comment - Java home: C:\Program Files\Java\jre1.6.0_03

INFO server comment - Java max heap size: 762MB

INFO server comment - CMDInterface now listening: [any]:8083

INFO vhost vhost-start defaultVHost -

INFO server comment - vhost home directory: C:\Program Files\Wowza Media Systems

\Wowza Media Server Pro 1.3.1

INFO vhost comment defaultVHost RTMP/RTMPT bind attempt ([any]:1935)

INFO vhost comment defaultVHost Bind successful ([any]:1935)

ERROR server comment - loadModFunctions: java.lang.ClassNotFoundException: com.a

dv.wms.module.ModuleEvents

java.lang.ClassNotFoundException: com.adv.wms.module.ModuleEvents

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at com.wowza.wms.util.ModuleUtils.addModuleToApp(Unknown Source)

at com.wowza.wms.util.ApplicationUtils.loadModules(Unknown Source)

at com.wowza.wms.util.ApplicationUtils.loadConfigFile(Unknown Source)

at com.wowza.wms.application.ApplicationInstance.loadConfig(Unknown Sour

ce)

at com.wowza.wms.application.ApplicationInstance.(Unknown Source)

at com.wowza.wms.application.Application.getAppInstance(Unknown Source)

at com.wowza.wms.module.ModuleConnect.connect(Unknown Source)

at com.wowza.wms.request.RequestProcessFunctions.processFunctions(Unknow

n Source)

at com.wowza.wms.request.RequestAdapter.service(Unknown Source)

at com.wowza.wms.server.ServerHandler.serviceRequest(Unknown Source)

at com.wowza.wms.server.ServerHandler.handleMessageReceived(Unknown Sour

ce)

at com.wowza.wms.server.ServerHandler.messageReceived(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceive

d(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageR

eceived(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unkno

wn Source)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.mess

ageReceived(Unknown Source)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flus

h(Unknown Source)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Unkn

own Source)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageR

eceived(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unkno

wn Source)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.mess

ageReceived(Unknown Source)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(Unknown S

ource)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.

run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source

)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

ERROR server comment - loadModFunctions: java.lang.ClassNotFoundException: com.a

dv.wms.module.ModuleServerSide

java.lang.ClassNotFoundException: com.adv.wms.module.ModuleServerSide

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at com.wowza.wms.util.ModuleUtils.addModuleToApp(Unknown Source)

at com.wowza.wms.util.ApplicationUtils.loadModules(Unknown Source)

at com.wowza.wms.util.ApplicationUtils.loadConfigFile(Unknown Source)

at com.wowza.wms.application.ApplicationInstance.loadConfig(Unknown Sour

ce)

at com.wowza.wms.application.ApplicationInstance.(Unknown Source)

at com.wowza.wms.application.Application.getAppInstance(Unknown Source)

at com.wowza.wms.module.ModuleConnect.connect(Unknown Source)

at com.wowza.wms.request.RequestProcessFunctions.processFunctions(Unknow

n Source)

at com.wowza.wms.request.RequestAdapter.service(Unknown Source)

at com.wowza.wms.server.ServerHandler.serviceRequest(Unknown Source)

at com.wowza.wms.server.ServerHandler.handleMessageReceived(Unknown Sour

ce)

at com.wowza.wms.server.ServerHandler.messageReceived(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceive

d(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageR

eceived(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unkno

wn Source)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.mess

ageReceived(Unknown Source)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flus

h(Unknown Source)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Unkn

own Source)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageR

eceived(Unknown Source)

at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unkno

wn Source)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.mess

ageReceived(Unknown Source)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(Unknown S

ource)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.

run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source

)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

INFO application app-start definst mymodules/definst

INFO session connect-pending 81.214.12.150 -

INFO session connect 81.214.12.150 -

Did you copy mymodules.jar to /usr/local/WowzaMediaServerPro/lib? It might also be a permission problem. Check the file permissions on /usr/local/WowzaMediaServerPro/lib/mymodules.jar. If you still can’t figure it out zip up your lib, conf and logs folders and send them to charlie@wowza.com.

Charlie

Please post the error you are seeing in the logs. Have you added anything (modues, .jar files) to your instance. We need a lot of detail to help.

Charlie

What folder did you copy the .jar file into? What version of Wowza are you running on EC2 and what version are you running locally? What version of Java are you running locally and on EC2?

Charlie

The jar files goes in the home/wowza/lib folder.

Charlie

I believe you sent me a not saying it is working. Is that correct? Do be sure you re-start Wowza after uploading .jar files. This is required. The .jar files are loaded at server startup.

Charlie

Thanks for your quick reply,

I have checked the permissions and there is no problem with it. I am sending the files. We are on Windows 2003 Server SP2.

I have sent the files to your email address.

Thanks for your help.

Hi,

Am I am having similar issues on a Linux EC2 instance, pretty much a duplicate of the thread description, was there a solution found for this?

Hi Charlie,

Ok here is the low down:

  • Application dir i.e. myexample in (1) applications (2) conf.

  • Application.xml edited to include the following:

    <Module>
    <Name>MyExampleModule</Name>
    <Description>MyExampleModule</Description>
    <Class>com.newtriks.module.MyExampleModule</Class>
    </Module>
    
  • Wowza module = myexample.jar and has the following package structure: com.newtriks.module.MyExampleModule

  • Permissions on myexample.jar are changed and opened up:

    -rwxrwxrwx 1 wowza wowza     351 Feb 28 08:02 myexample.jar
    

    All of this is checked and works locally on my wowza installation.

    I then uploaded the locally compiled jar and relevant items up to (a) a wowza developer installation on an Amazon Linux EC2 AMi and (b) a Wowza Media Server 2 for EC2 Edition instance. Both fail with the same Error (all above checked on both instances):

    ERROR server comment 2011-02-28 08:06:57 - - - - - 75.788 - - - - - - - - loadModFunctions: java.lang.ClassNotFoundException: com.newtriks.module.MyExampleModule

    Cheers,

    Simon

What folder did you copy the .jar file into?

home/wowza/conf

What version of Wowza are you running on EC2 and what version are you running locally?

On the EC2 its using the ami-5453a53d AMI

Locally I am running 2.2.3

What version of Java are you running locally and on EC2?

1.6.0_22

Seems the JAR was a dud, it took a recompile and server reboot to get it connecting now so all sorted. What is odd is that the JAR worked locally though?

If I was to copy the build specifics for the ANT build to another IDE are there any gotchas to get the jar to compile?

Sorry I typed it wrong above, I did indeed put it into the lib directory.

Hi Charlie,

To confirm, yes it is working now thank you. There seems to be an issue where the JAR is not getting compiled correctly on every build and therefore a JAR with missing information was uploaded to the server. Running the ANT build sometimes results in a JAR thats 4k for example, then an immediate re-run of the ANT build produces a JAR of 8k, so it seems the build process is the root of my issues.

Thanks again,

Simon