I know that this might be caused by an error in my custom module but the log doesn't say much in which part exactly so I am having trouble debugging it. This error appears as soon as the nDVR starts recording. I have implemented both IModuleOnHTTPCupertinoEncryption and IModuleOnHTTPSmoothStreamingPlayReady in my module. My question is when such an error like this normally occurs? I observed that it starts when the nDVR recording starts but what does onHTTPCupertinoEncryptionKeyLiveChunk got to do with nDVR if not only to get the encryption data. The live channel works perfect with encryption so I dont think it might have something to do with the implementation on onHTTPCupertinoEncryptionKeyLiveChunk.
You get this type of error because of the way Wowza module methods are invoked. It uses Java Reflection which does have the unwanted effect that any stack traces for uncaught exceptions will only go back as far as the invoke method. Unfortunately, the stack trace doesn't provide enough info to tell what caused the original exception.
To get the information you need, simply wrap the contents for your module methods with a try / catch block and log the exception. That exception should give you more information about the cause.
The original error tells you that the method that caused the exception was onHTTPCupertinoEncryptionKeyLiveChunk so use the following in that method
public void onHTTPCupertinoEncryptionKeyLiveChunk(ILiveStreamPacketizer liveStreamPacketizer, String streamName, CupertinoEncInfo encInfo, long chunkId, int mode)
// Put original method body here.
// Log exception and stack trace.
getLogger().error("onHTTPCupertinoEncryptionKeyLiveChunk Exception: " + e.getMessage(), e);
// Perform any cleanup here.
The log statement will log an error similar to what you are already getting but the difference is the stack trace will start from your method.