Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Conflicting classes after upgrade to 4.0.1

  1. #1
    Join Date
    Oct 2012
    Posts
    23

    Default Conflicting classes after upgrade to 4.0.1

    I used org.apache.http.impl.client.HttpClients to upload file from wowza app to external server.
    In WMS 3.6.4 all works fine.
    In WSE 4.0.1 I get error:

    ERROR	server	comment	2014-03-11	16:36:57	-	-	-	-	-	24.472	-  invoke(createSnapshotLive): java.lang.NoSuchFieldError: INSTANCE: org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52)
    I found why this happens here http://stackoverflow.com/questions/2...atter-instance

    The problem is that WSE 4.0.1 has conflicted class with apache http client library.

    If I testing my upload file component. No error. Using class from original apache jar
    jar:file:/C:/Program%20Files%20(x86)/Wowza%20Media%20Systems/Wowza%20Streaming%20Engine%204.0.1/lib/httpcore-4.3.2.jar!/org/apache/http/message/BasicLineFormatter.class
    Then run component from wowza app. Error. Used class from wms-restlet-2.1.6.jar:
    jar:file:/usr/local/WowzaStreamingEngine/lib/wms-restlet-2.1.6.jar!/org/apache/http/message/BasicLineFormatter.class
    How should I use apache http client 4.3.3 lib in WSE 4.0.1?

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    I think the only solution is to re-write your uploader to avoid this: rename, extend to other names, or use the conflicting API. The only work-around would be to run Wowza Engine but not the Manager, which I think is where the conflict is.

    Richard
    Last edited by rrlanham; 03-12-2014 at 07:45 AM.

  3. #3
    Join Date
    Oct 2012
    Posts
    23

    Default

    Thanks, I rewrote this part using "curl" shell command

  4. #4
    Join Date
    Mar 2011
    Posts
    18

    Default

    So you mean that it is not possible to use a popular library like http-client with Wowza anymore?

    I am getting the same error when instancing PoolingHttpClientConnectionManager.

    PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();

    java.lang.NoSuchFieldError: INSTANCE
    at org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java: 52)
    at org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java: 56)
    at org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<clinit>(DefaultHttpRequestWriterFactory.jav a:46)
    at org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFacto ry.java:72)
    at org.apache.http.impl.conn.ManagedHttpClientConnectionFactory.<init>(ManagedHttpClientConnectionFacto ry.java:84)

  5. #5
    Join Date
    Mar 2011
    Posts
    18

    Default

    I fixed the problem moving the HttpCient initialization out of Server init event it was attached too.

    I found similar posts of issues with HttpClient when it running in another java framework not related to stream in the initializing events. In this framework the problem was that HTTpClient was not serializable and objects in the init should be.

    But not sure if it is the same thing here.

  6. #6
    Join Date
    Mar 2011
    Posts
    18

    Default

    Now I got that the problem persist. I just was not throwing the error anymore.

  7. #7

    Exclamation

    Yeah, it looks like a hot topic. Today I faced the same issue.
    I have a number of custom modules using Apache HttpClient 4.3.x and all of them are not working with Wowza 4 because it is packaged with wms-restlet-2.1.6.jar which has HttpClient 4.1.1 incorporated.

    The problem is that HttpClient 4.1.x is rare thing, it is really hard to find, on the original site http://hc.apache.org/ there is no information about this version. I even can't find the documentation for that.

    The last version of restlet.org is 2.2 and it uses httpclient 4.3.x.

    Is it possible for Wowza Streaming Engine to migrate to restlet.org-2.2 ?

    Thank you,
    Denis
    Last edited by DenisC; 04-16-2014 at 05:21 AM.

  8. #8
    Join Date
    Jan 2010
    Posts
    24

    Default

    Hello Wowza,

    Please upgrade the HTTP Client to the latest version 4.3 along with 2.2 of restlet. I now have to get plugins remade for this HTTP 4.1 stuff just when I was looking to deploy Wowza 4 across the server farm for a client.

    Thanks.

  9. #9
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Hi,

    I forwarded your comments.

    Thanks,
    Richard

  10. #10

    Default

    Also there is another reason to use HttpClient 4.3 - because of GA version of HttpAsyncClient depend on it. So, if using HttpClient 4.1 we are limited to use HttpAsyncClient.

    By the way, I just tried to remove built-in HttpClient from wms-restlet-2.1.6.jar and replace it with external jar of HttpClient 4.3.2. Seems Wowza REST API works fine with it but more testing needed to be sure.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •