# How to use newer external libraries in Wowza project

**URL:** https://community.wowza.com/t/how-to-use-newer-external-libraries-in-wowza-project/36129
**Category:** Wowza Developer Dojo
**Tags:** wowza-streaming-server-java-api
**Created:** [March 16, 2014, 10:46pm UTC](https://community.wowza.com/t/how-to-use-newer-external-libraries-in-wowza-project/36129 "2014-03-16T22:46:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Simon\_Bailey](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@Simon\_Bailey](https://community.wowza.com/u/Simon_Bailey)
#### Post date: [March 16, 2014, 10:46pm UTC](https://community.wowza.com/t/how-to-use-newer-external-libraries-in-wowza-project/36129/1 "2014-03-16T22:46:17Z")

</div>

I want to use HttpComponents/Client 4.3 a newer version (I think) to what Wowza uses. I have tried adding the necessary external jars (httpclient-4.3.3.jar, httpcore-4.3.2.jar) to wowza/lib and restarted wowza but it still throws errors in the ide e.g.

```auto
Description	Resource	Path	Location	Type
The constructor UrlEncodedFormEntity(List<NameValuePair>, Charset) is undefined	MediaWriteListener.java	/MediaWriteListener/src/com/newtriks	line 53	Java Problem
Description	Resource	Path	Location	Type
The method consumeQuietly(HttpEntity) is undefined for the type EntityUtils	MediaWriteListener.java	/MediaWriteListener/src/com/newtriks	line 57	Java Problem

```

Please could someone highlight the exact steps to override older wowza related classes with my external libs?

**Update:**

This seems to be related to [this thread](http://community.wowza.com/t/-/39394) which has an unanswered question posed at the end of the thread. They raise a point which enforces my question. How to manage conflicting (popular) classes with the older dated versions WSE bundles.

I can fix the warnings in the IDE using:

1. Right click Referenced Libraries \> Build Path \> Configure Build Path…

2. Select Order and Export tab.

3. Select external classes and move them to the top.

On the remote wowza EC2 instance it still is not working and throws the below error. Bizarrely locally it works…

```auto
ERROR 500 - invoke(onAppStart): 
java.lang.NoSuchFieldError: INSTANCE: org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)

```

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [March 17, 2014, 6:32pm UTC](https://community.wowza.com/t/how-to-use-newer-external-libraries-in-wowza-project/36129/2 "2014-03-17T18:32:32Z")

</div>

Reference ticket #85046

---

<div class="post-metadata">

### Author: ![Simon\_Bailey](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@Simon\_Bailey](https://community.wowza.com/u/Simon_Bailey)
#### Post date: [March 18, 2014, 2:22pm UTC](https://community.wowza.com/t/how-to-use-newer-external-libraries-in-wowza-project/36129/3 "2014-03-18T14:22:40Z")

</div>

I am yet to find the true cause of this issue, however, [https://code.google.com/p/jarjar/](https://code.google.com/p/jarjar/) was the ultimate solution I resorted to…

---

<div class="post-metadata">

### Author: ![Rafael\_Sobral](https://avatars.discourse-cdn.com/v4/letter/r/87869e/32.png) [@Rafael\_Sobral](https://community.wowza.com/u/Rafael_Sobral)
#### Post date: [April 10, 2014, 8:55am UTC](https://community.wowza.com/t/how-to-use-newer-external-libraries-in-wowza-project/36129/4 "2014-04-10T08:55:58Z")

</div>

Hi,

What does “Reference ticket #85046” ticket means?

---

<div class="post-metadata">

### Author: ![Rafael\_Sobral](https://avatars.discourse-cdn.com/v4/letter/r/87869e/32.png) [@Rafael\_Sobral](https://community.wowza.com/u/Rafael_Sobral)
#### Post date: [April 10, 2014, 9:00am UTC](https://community.wowza.com/t/how-to-use-newer-external-libraries-in-wowza-project/36129/5 "2014-04-10T09:00:08Z")

</div>

For me it works locally too. Just in production server it do not.

Another strange think is that if the code is added in the init server listener it throws an exception, but if it is in another place it just kill the thread silently.

It makes it very hard to debug.

---

<div class="post-metadata">

### Author: ![Rafael\_Sobral](https://avatars.discourse-cdn.com/v4/letter/r/87869e/32.png) [@Rafael\_Sobral](https://community.wowza.com/u/Rafael_Sobral)
#### Post date: [April 10, 2014, 4:58pm UTC](https://community.wowza.com/t/how-to-use-newer-external-libraries-in-wowza-project/36129/6 "2014-04-10T16:58:00Z")

</div>

hi newtriks,

your tip was great. Thanks.

I fixed using maven shade plugin

org.apache.maven.plugins

maven-shade-plugin

1.4

package

shade

false

true

org.apache.httpcomponents:httpclient

org.apache.httpcomponents:httpcore

org.apache.http

wowza.org.apache.http
