Getting NoClassDefFoundError: org/apache/commons/lang/SystemUtils

Hi there,

i followed THIS instruction to configure the Transcoder AddOn for transrating from a h264-stream.

My Application is a basic Wowza-IDE-Project on Ubuntu 12.04 - the Application.xml looks like this:

<Root>
	<Application>
		<Connections>
			<AutoAccept>true</AutoAccept>
			<AllowDomains></AllowDomains>
		</Connections>
		<Streams>
			<StreamType>live</StreamType>
			<StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
			<KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
			<LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer</LiveStreamPacketizers>			
			<Properties>
			</Properties>
		</Streams>
		<Transcoder>
			<LiveStreamTranscoder>transcoder</LiveStreamTranscoder>
			<Templates>${SourceStreamName}.xml,transrate.xml</Templates>
			<ProfileDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles</ProfileDir>
			<TemplateDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/templates</TemplateDir>
			<Properties>
			</Properties>
		</Transcoder>
		<DVR>
			<Recorders></Recorders>
			<Store></Store>
			<WindowDuration>0</WindowDuration>
			<StorageDir>${com.wowza.wms.context.VHostConfigHome}/dvr</StorageDir>
			<ArchiveStrategy>append</ArchiveStrategy>
			<Properties>
			</Properties>
		</DVR>
		<TimedText>
			<VODTimedTextProviders>vodcaptionprovidermp4_3gpp</VODTimedTextProviders>
			
			<Properties>
			</Properties>
		</TimedText>
		<HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>
		<SharedObjects>
			<StorageDir></StorageDir>
		</SharedObjects>
		<Client>
			<IdleFrequency>-1</IdleFrequency>
			<Access>
				<StreamReadAccess>*</StreamReadAccess>
				<StreamWriteAccess>*</StreamWriteAccess>
				<StreamAudioSampleAccess></StreamAudioSampleAccess>
				<StreamVideoSampleAccess></StreamVideoSampleAccess>
				<SharedObjectReadAccess>*</SharedObjectReadAccess>
				<SharedObjectWriteAccess>*</SharedObjectWriteAccess>
			</Access>
		</Client>
		<RTP>
			<Authentication>
				<PublishMethod>digest</PublishMethod>
				<PlayMethod>none</PlayMethod>
			</Authentication>
			<AVSyncMethod>senderreport</AVSyncMethod>
			<MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
			<IdleFrequency>75</IdleFrequency>
			<RTSPSessionTimeout>90000</RTSPSessionTimeout>
			<RTSPMaximumPendingWriteBytes>0</RTSPMaximumPendingWriteBytes>
			<RTSPBindIpAddress></RTSPBindIpAddress>
			<RTSPConnectionIpAddress>0.0.0.0</RTSPConnectionIpAddress>
			<RTSPOriginIpAddress>127.0.0.1</RTSPOriginIpAddress>
			<IncomingDatagramPortRanges>*</IncomingDatagramPortRanges>
			<Properties>
			</Properties>
		</RTP>
		<MediaCaster>
			<RTP>
				<RTSP>
					<RTPTransportMode>interleave</RTPTransportMode>
				</RTSP>
			</RTP>
			<Properties>
			</Properties>
		</MediaCaster>
		<MediaReader>
			<Properties>
			</Properties>
		</MediaReader>
		<MediaWriter>
			<Properties>
			</Properties>
		</MediaWriter>
		<LiveStreamPacketizer>
			<Properties>
			</Properties>
		</LiveStreamPacketizer>
		<HTTPStreamer>
			<Properties>
			</Properties>
		</HTTPStreamer>
		<Repeater>
			<OriginURL></OriginURL>
			<QueryString><![CDATA[]]></QueryString>
		</Repeater> 
		<Modules>
			<Module>
				<Name>base</Name>
				<Description>Base</Description>
				<Class>com.wowza.wms.module.ModuleCore</Class>
			</Module>
			<Module>
				<Name>properties</Name>
				<Description>Properties</Description>
				<Class>com.wowza.wms.module.ModuleProperties</Class>
			</Module>
			<Module>
				<Name>logging</Name>
				<Description>Client Logging</Description>
				<Class>com.wowza.wms.module.ModuleClientLogging</Class>
			</Module>
			<Module>
				<Name>flvplayback</Name>
				<Description>FLVPlayback</Description>
				<Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
			</Module>
                        <Module>
                                <Name>TranscoderTest</Name>
                                <Description>Test Streaming</Description>
                                <Class>com.vipinfotainment.Main</Class>
                        </Module>
		</Modules>
		<Properties>
		</Properties>
	</Application>
</Root>

And the /transcoder/templates/transrate.xml looks like this:

<Root>
	<Transcode>
		<Encodes>
			<Encode>
				<Enable>true</Enable>
				<Name>source</Name>
				<StreamName>mp4:${SourceStreamName}_source</StreamName>
				<Video>
					<Codec>PassThru</Codec>
					<Bitrate>${SourceVideoBitrate}</Bitrate>
					<Parameters>
					</Parameters>
				</Video>
				<Audio>
					<Codec>PassThru</Codec>
					<Bitrate>${SourceAudioBitrate}</Bitrate>
					<Parameters>
					</Parameters>
				</Audio>
				<Properties>
				</Properties>
			</Encode>
			<Encode>
				<Enable>false</Enable>
				<Name>720p</Name>
				<StreamName>mp4:${SourceStreamName}_720p</StreamName>
				<Video>
					<Codec>H.264</Codec>
					<Transcoder>default</Transcoder>
					<GPUID>-1</GPUID>
					<FrameSize>
						<FitMode>fit-height</FitMode>
						<Width>1280</Width>
						<Height>720</Height>
					</FrameSize>
					<Profile>main</Profile>
					<Bitrate>1300000</Bitrate>
					<KeyFrameInterval>
						<FollowSource>true</FollowSource>
						<Interval>60</Interval>
					</KeyFrameInterval>
					<Overlays>
						<Overlay>
							<Enable>false</Enable>
							<Index>0</Index>
							<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
							<CheckForUpdates>false</CheckForUpdates>
							<Opacity>100</Opacity>
							<Location>
								<X>4</X>
								<Y>4</Y>
								<Width>${ImageWidth}</Width>
								<Height>${ImageHeight}</Height>
								<Align>left,top</Align>
							</Location>
						</Overlay>
					</Overlays>
					<Parameters>
					</Parameters>
				</Video>
				<Audio>
					<Codec>PassThru</Codec>
					<Bitrate>${SourceAudioBitrate}</Bitrate>
					<Parameters>
					</Parameters>
				</Audio>
				<Properties>
				</Properties>
			</Encode>
			<Encode>
				<Enable>true</Enable>
				<Name>360p</Name>
				<StreamName>mp4:${SourceStreamName}_360p</StreamName>
				<Video>
					<Codec>H.264</Codec>
					<Transcoder>default</Transcoder>
					<GPUID>-1</GPUID>
					<FrameSize>
						<FitMode>fit-height</FitMode>
						<Width>640</Width>
						<Height>360</Height>
					</FrameSize>
					<Profile>main</Profile>
					<Bitrate>850000</Bitrate>
					<KeyFrameInterval>
						<FollowSource>true</FollowSource>
						<Interval>60</Interval>
					</KeyFrameInterval>
					<Overlays>
						<Overlay>
							<Enable>false</Enable>
							<Index>0</Index>
							<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
							<CheckForUpdates>false</CheckForUpdates>
							<Opacity>100</Opacity>
							<Location>
								<X>4</X>
								<Y>4</Y>
								<Width>${ImageWidth}</Width>
								<Height>${ImageHeight}</Height>
								<Align>left,top</Align>
							</Location>
						</Overlay>
					</Overlays>
					<Parameters>
					</Parameters>
				</Video>
				<Audio>
					<Codec>PassThru</Codec>
					<Bitrate>${SourceAudioBitrate}</Bitrate>
					<Parameters>
					</Parameters>
				</Audio>
				<Properties>
				</Properties>
			</Encode>
			<Encode>
				<Enable>false</Enable>
				<Name>240p</Name>
				<StreamName>mp4:${SourceStreamName}_240p</StreamName>
				<Video>
					<Codec>H.264</Codec>
					<Transcoder>default</Transcoder>
					<GPUID>-1</GPUID>
					<FrameSize>
						<FitMode>fit-height</FitMode>
						<Width>360</Width>
						<Height>240</Height>
					</FrameSize>
					<Profile>baseline</Profile>
					<Bitrate>350000</Bitrate>
					<KeyFrameInterval>
						<FollowSource>true</FollowSource>
						<Interval>60</Interval>
					</KeyFrameInterval>
					<Overlays>
						<Overlay>
							<Enable>false</Enable>
							<Index>0</Index>
							<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
							<CheckForUpdates>false</CheckForUpdates>
							<Opacity>100</Opacity>
							<Location>
								<X>4</X>
								<Y>4</Y>
								<Width>${ImageWidth}</Width>
								<Height>${ImageHeight}</Height>
								<Align>left,top</Align>
							</Location>
						</Overlay>
					</Overlays>
					<Parameters>
					</Parameters>
				</Video>
				<Audio>
					<Codec>PassThru</Codec>
					<Bitrate>${SourceAudioBitrate}</Bitrate>
					<Parameters>
					</Parameters>
				</Audio>
				<Properties>
				</Properties>
			</Encode>
			<Encode>
				<Enable>true</Enable>
				<Name>160p</Name>
				<StreamName>mp4:${SourceStreamName}_160p</StreamName>
				<Video>
					<Codec>H.264</Codec>
					<Transcoder>default</Transcoder>
					<GPUID>-1</GPUID>
					<FrameSize>
						<FitMode>fit-height</FitMode>
						<Width>284</Width>
						<Height>160</Height>
					</FrameSize>
					<Profile>baseline</Profile>
					<Bitrate>200000</Bitrate>
					<KeyFrameInterval>
						<FollowSource>true</FollowSource>
						<Interval>60</Interval>
					</KeyFrameInterval>
					<Overlays>
						<Overlay>
							<Enable>false</Enable>
							<Index>0</Index>
							<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
							<CheckForUpdates>false</CheckForUpdates>
							<Opacity>100</Opacity>
							<Location>
								<X>4</X>
								<Y>4</Y>
								<Width>${ImageWidth}</Width>
								<Height>${ImageHeight}</Height>
								<Align>left,top</Align>
							</Location>
						</Overlay>
					</Overlays>
					<Parameters>
					</Parameters>
				</Video>
				<Audio>
					<Codec>PassThru</Codec>
					<Bitrate>${SourceAudioBitrate}</Bitrate>
					<Parameters>
					</Parameters>
				</Audio>
				<Properties>
				</Properties>
			</Encode>
			<Encode>
				<Enable>false</Enable>
				<Name>h263</Name>
				<StreamName>mp4:${SourceStreamName}_h263</StreamName>
				<Video>
					<Codec>H.263</Codec>
					<Transcoder>default</Transcoder>
					<GPUID>-1</GPUID>
					<FrameSize>
						<FitMode>letterbox</FitMode>
						<Width>176</Width>
						<Height>144</Height>
					</FrameSize>
					<Profile>baseline</Profile>
					<Bitrate>150000</Bitrate>
					<KeyFrameInterval>
						<FollowSource>false</FollowSource>
						<Interval>60</Interval>
					</KeyFrameInterval>
					<Overlays>
						<Overlay>
							<Enable>false</Enable>
							<Index>0</Index>
							<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
							<CheckForUpdates>false</CheckForUpdates>
							<Opacity>100</Opacity>
							<Location>
								<X>4</X>
								<Y>4</Y>
								<Width>${ImageWidth}</Width>
								<Height>${ImageHeight}</Height>
								<Align>left,top</Align>
							</Location>
						</Overlay>
					</Overlays>
					<Parameters>
					</Parameters>
				</Video>
				<Audio>
					<Codec>AAC</Codec>
					<Bitrate>64000</Bitrate>
					<Parameters>
					</Parameters>
				</Audio>
				<Properties>
				</Properties>
			</Encode>
		</Encodes>
		<Decode>
			<Video>
				<Deinterlace>false</Deinterlace>
				<Overlays>
					<Overlay>
						<Enable>false</Enable>
						<Index>0</Index>
						<ImagePath>${com.wowza.wms.context.VHostConfigHome}/content/wowzalogo.png</ImagePath>
						<CheckForUpdates>false</CheckForUpdates>
						<Opacity>100</Opacity>
						<Location>
							<X>4</X>
							<Y>4</Y>
							<Width>${ImageWidth}</Width>
							<Height>${ImageHeight}</Height>
							<Align>left,top</Align>
						</Location>
					</Overlay>
				</Overlays>
				<Parameters>
				</Parameters>
			</Video>
			<Properties>
			</Properties>
		</Decode>
		<StreamNameGroups>
			<StreamNameGroup>
				<Name>all</Name>
				<StreamName>${SourceStreamName}_all</StreamName>
				<Members>
					<Member>
						<EncodeName>source</EncodeName>
					</Member>
					<Member>
						<EncodeName>720p</EncodeName>
					</Member>
					<Member>
						<EncodeName>360p</EncodeName>
					</Member>
					<Member>
						<EncodeName>240p</EncodeName>
					</Member>
					<Member>
						<EncodeName>160p</EncodeName>
					</Member>
				</Members>
			</StreamNameGroup>
			<StreamNameGroup>
				<Name>mobile</Name>
				<StreamName>${SourceStreamName}_mobile</StreamName>
				<Members>
					<Member>
						<EncodeName>240p</EncodeName>
					</Member>
					<Member>
						<EncodeName>160p</EncodeName>
					</Member>
				</Members>
			</StreamNameGroup>
		</StreamNameGroups>
		<Properties>
		</Properties>
	</Transcode>
</Root>

So every time I publish a stream a NoClassDefFoundErrer is raised:

Configure logging: file:///usr/local/WowzaMediaServer/conf/log4j.properties
INFO server server-start Wowza Media Server 3 Developer Edition (Expires: Feb 23, 2014) 3.6.2.10 build6427 -
INFO server comment - Server License Key: 
INFO server comment - Maximum Connections: 10
INFO server comment - Transcoder Streams Available: 2
INFO server comment - Transcoder Watermark: Yes
INFO server comment - nDVR Available: Yes
INFO server comment - DRM Available: Yes
INFO server comment - Hardware Available Processors: 4
INFO server comment - Hardware Physical Memory: 3885MB/11897MB
INFO server comment - Hardware Swap Space: 12165MB/12165MB
INFO server comment - Max File Descriptor Count: 4096
INFO server comment - Open File Descriptor Count: 59
INFO server comment - OS Name: Linux
INFO server comment - OS Version: 3.5.0-40-generic
INFO server comment - OS Architecture: amd64
INFO server comment - Java Name: OpenJDK 64-Bit Server VM
INFO server comment - Java Vendor: Sun Microsystems Inc.
INFO server comment - Java Version: 1.6.0_27
INFO server comment - Java VM Version: 20.0-b12
INFO server comment - Java Spec Version: 1.6
INFO server comment - Java Home: /usr/lib/jvm/java-6-openjdk-amd64/jre
INFO server comment - Java Max Heap Size: 682MB
INFO server comment - Java Architecture: 64
INFO server comment - Java Locale[user.language]: de
INFO server comment - Java Locale[user.country]: DE
INFO server comment - Java Locale[file.encoding]: UTF-8
INFO server comment - Java Timezone[user.timezone]: Europe/Berlin
INFO server comment - Java Args[0]: -Xmx768M
INFO server comment - Java Args[1]: -Dcom.wowza.wms.AppHome=/usr/local/WowzaMediaServer
INFO server comment - Java Args[2]: -Dcom.wowza.wms.ConfigHome=/usr/local/WowzaMediaServer
INFO server comment - Java Args[3]: -Dcom.sun.management.jmxremote=true
INFO server comment - Java Args[4]: -Dfile.encoding=UTF-8
INFO server comment - Server native.platform: linux
INFO server comment - Server threads[h/t]: 10/10
INFO server comment - CMDInterface now listening: [any]:8083
INFO vhost vhost-start _defaultVHost_ -
INFO server comment - _defaultVHost_ threads[h/t]:120/80 home:/usr/local/WowzaMediaServer
INFO vhost comment _defaultVHost_ Bind attempt ([any]:1935:4)
INFO vhost comment _defaultVHost_ Bind successful ([any]:1935)
INFO vhost comment _defaultVHost_ Bind attempt ([any]:8086:1)
INFO vhost comment _defaultVHost_ Bind successful ([any]:8086)
INFO server comment - Server.startShutdownHook: Start server shutdown hook
INFO server comment - Wowza Media Server is started!
INFO server comment - onAppStart: live/12345
INFO application app-start 12345 live/12345
INFO session connect-pending 127.0.0.1 -
INFO server comment - onConnect: 129644068
INFO session connect 127.0.0.1 -
INFO server comment - onConnectAccept: 129644068
INFO server comment - onStreamCreate: 1
INFO stream create - -
INFO server comment - onStreamCreate: 2
INFO stream create - -
INFO stream publish user_video -
INFO server comment - onPublish: 129644068
INFO stream publish user_audio -
INFO server comment - onPublish: 129644068
[B][COLOR="#FF0000"]Exception in thread "VHostHandler._defaultVHost_.39" java.lang.NoClassDefFoundError: org/apache/commons/lang/SystemUtils
	at com.wowza.wms.bootstrap.Bootstrap.getNativeLibPath(Unknown Source)
	at com.wowza.wms.transcoder.model.TranscoderSessionNative.<clinit>(Unknown Source)
	at com.wowza.wms.transcoder.model.TranscoderSession.<init>(Unknown Source)
	at com.wowza.wms.transcoder.model.LiveStreamTranscoder.<init>(Unknown Source)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
	at java.lang.Class.newInstance0(Class.java:374)
	at java.lang.Class.newInstance(Class.java:327)
	at com.wowza.wms.stream.livetranscoder.LiveStreamTranscoderFactory.createInstance(Unknown Source)
	at com.wowza.wms.stream.live.LiveReceiver.a(Unknown Source)
	at com.wowza.wms.stream.live.LiveReceiver.initPacketizers(Unknown Source)
	at com.wowza.wms.stream.live.LiveReceiver.newPacket(Unknown Source)
	at com.wowza.wms.stream.live.LiveReceiver.addAudioData(Unknown Source)
	at com.wowza.wms.stream.live.MediaStreamLive.addAudioData(Unknown Source)
	at com.wowza.wms.request.RequestProcessData.processNextRequest(Unknown Source)
	at com.wowza.wms.client.ClientWorker.processNextReq(Unknown Source)
	at com.wowza.wms.request.RTMPRequestAdapter.service(Unknown Source)
	at com.wowza.wms.server.ServerHandler.a(Unknown Source)
	at com.wowza.wms.server.ServerHandler.a(Unknown Source)
	at com.wowza.wms.server.ServerHandler.messageReceived(Unknown Source)
	at com.wowza.wms.server.ServerHandlerThreadedSession.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.SystemUtils
	at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
	... 26 more[/COLOR][/B]
INFO session comment 129644068 client connectionClosed [129644068] watchdog
INFO stream unpublish user_video -
INFO server comment - onUnPublish: 129644068
INFO server comment - onStreamDestroy: 1
INFO stream destroy user_video -
INFO stream unpublish user_audio -
INFO server comment - onUnPublish: 129644068
INFO server comment - onStreamDestroy: 2
INFO stream destroy user_audio -
INFO session disconnect 129644068 -
INFO server comment - onDisconnect: 129644068
INFO server comment - clientUser: 129644068
INFO application app-stop 12345 live/12345
INFO server comment - onAppStop: live/12345

For debugging reasons I’ve set all permissions to 777, reinstall Wowza and replace the “commons-lang-2.6.jar” without taking any effect.

Can somebody explain me, whats wrong?

Tell me, if you need some more informations.

Many regards,

André

Take a look at this article and see if it fixes this:

How to use Wowza IDE with Wowza Transcoder AddOn

Salvadore

Thanks the update. Glad it is working now.

Salvadore

Cool, thanks a lot Salvadore!

I also had to change this:

-Dcom.wowza.wms.native.base="win"

to

-Dcom.wowza.wms.native.base="linux"

Now it works :slight_smile: