NoSuchMethodError: org.apache.http.conn.scheme.Scheme.(Ljava/lang/String;ILorg/apache/http/conn/scheme/SchemeSocketFactory;)V

后端 未结 2 1435
南方客
南方客 2021-01-14 05:18

I am running selenium test in maven project.This project is GWT Web application.There are GWT dependencies,hibernate dependencies in pom.xml.I have created a new class in te

2条回答
  •  春和景丽
    2021-01-14 05:30

    A NoSuchMethodError indicates that classes available at runtime are different to those used to compile your code.

    It usually boils down to having multiple versions of the same class on the classpath. Double check this for the class in question and remove the unwanted version.

    [EDIT] Add this to your pom.xml to control the version of httpclient:

    
        
            
                org.apache.httpcomponents
                httpclient
                [4.2.1]
            
        
    
    

提交回复
热议问题