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.
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?
This seems to be related to this thread 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:
Right click Referenced Libraries > Build Path > Configure Build Path…
Select Order and Export tab.
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…
ERROR 500 - invoke(onAppStart): java.lang.NoSuchFieldError: INSTANCE: org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)