New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The old Selenium dependency makes user's code throw java.lang.NoSuchMethodError #714

Closed
TikhomirovSergey opened this Issue Aug 30, 2017 · 11 comments

Comments

Projects
None yet
3 participants
@TikhomirovSergey
Member

TikhomirovSergey commented Aug 30, 2017

Description

There are many issue reports where users complain about java.lang.NoSuchMethodError and related dependency conflicts.

Environment

Any

Details

https://gist.github.com/TikhomirovSergey/f008a577cac9b6c92fb1def9a2aa5406

It seems I found the root cause. I is probably because of html-unit driver which is supplied by Selenium.
The possible solution:

  • exclude this artefact
@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
@SrinivasanTarget

SrinivasanTarget Aug 31, 2017

Member

@TikhomirovSergey can we exclude all the browser specific drivers?

Member

SrinivasanTarget commented Aug 31, 2017

@TikhomirovSergey can we exclude all the browser specific drivers?

@TikhomirovSergey

This comment has been minimized.

Show comment
Hide comment
@TikhomirovSergey

TikhomirovSergey Aug 31, 2017

Member

@SrinivasanTarget I think only htmlUnit. Also could you check dependencies of phantomJS?

Member

TikhomirovSergey commented Aug 31, 2017

@SrinivasanTarget I think only htmlUnit. Also could you check dependencies of phantomJS?

@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
@SrinivasanTarget
Member

SrinivasanTarget commented Aug 31, 2017

@EitanBe

This comment has been minimized.

Show comment
Hide comment
@EitanBe

EitanBe Aug 31, 2017

Can you please tell when you going to merge the fix, or if there is a workaround until the fix would be published. (Which version)
Thanks a lot guys!

EitanBe commented Aug 31, 2017

Can you please tell when you going to merge the fix, or if there is a workaround until the fix would be published. (Which version)
Thanks a lot guys!

@TikhomirovSergey

This comment has been minimized.

Show comment
Hide comment
@TikhomirovSergey

TikhomirovSergey Aug 31, 2017

Member

@EitanBe We are going to merge it and publish 5.0.2 on this weekend (02.09.2017-03.09.2017). As a workaround you can add exclusions of htmlunit-driver and phantomjsDriver

Member

TikhomirovSergey commented Aug 31, 2017

@EitanBe We are going to merge it and publish 5.0.2 on this weekend (02.09.2017-03.09.2017). As a workaround you can add exclusions of htmlunit-driver and phantomjsDriver

@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
@SrinivasanTarget

SrinivasanTarget Sep 1, 2017

Member

@TikhomirovSergey I'm not able to reproduce this locally. I don't see any issues including html-unit driver. Everything works fine for me.

Member

SrinivasanTarget commented Sep 1, 2017

@TikhomirovSergey I'm not able to reproduce this locally. I don't see any issues including html-unit driver. Everything works fine for me.

@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
@SrinivasanTarget

SrinivasanTarget Sep 1, 2017

Member

@EitanBe Can you share me your pom.xml or build.gradle inform of gist here?

Member

SrinivasanTarget commented Sep 1, 2017

@EitanBe Can you share me your pom.xml or build.gradle inform of gist here?

@TikhomirovSergey

This comment has been minimized.

Show comment
Hide comment
@TikhomirovSergey

TikhomirovSergey Sep 1, 2017

Member

@SrinivasanTarget It is difficult to reproduce it inside in sources. It may be reproduced when java_client is used as a dependency. Please take a look at this issue report #709. Please read the dependency tree attached to the report and take a look at dependencies.

Member

TikhomirovSergey commented Sep 1, 2017

@SrinivasanTarget It is difficult to reproduce it inside in sources. It may be reproduced when java_client is used as a dependency. Please take a look at this issue report #709. Please read the dependency tree attached to the report and take a look at dependencies.

@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
@SrinivasanTarget

SrinivasanTarget Sep 1, 2017

Member

Yeah @TikhomirovSergey I was trying to reproduce it as external dependency but still not able too.

Member

SrinivasanTarget commented Sep 1, 2017

Yeah @TikhomirovSergey I was trying to reproduce it as external dependency but still not able too.

@EitanBe

This comment has been minimized.

Show comment
Hide comment
@EitanBe

EitanBe Sep 2, 2017

@SrinivasanTarget Hi here is the list of my dependencies:


<dependencies>
        <!--Tests cucumber and spring junit-->
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java8</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>LATEST</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>LATEST</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-spring</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-testng</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-apache</artifactId>
            <version>0.5.0</version>
        </dependency>
        <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-junit4</artifactId>
            <version>0.5.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>4.3.9.RELEASE</version>
        </dependency>
        <!-- End testing -->

        <!-- log4j -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${log4j2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${log4j2.version}</version>
        </dependency>

        <!-- End log4j -->

        <!-- jcraft for SSH-->
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>0.1.54</version>
        </dependency>

        <!-- End jcraft for SSH-->

        <!-- adb tool java object -->
        <dependency>
            <groupId>com.github.vidstige</groupId>
            <artifactId>jadb</artifactId>
            <version>1.0.1</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/jadb-1.0.0-SNAPSHOT.jar</systemPath>
        </dependency>

        <!-- End adb tool java object -->

        <!-- BigQuery -->
        <dependency>
            <groupId>com.google.apis</groupId>
            <artifactId>google-api-services-bigquery</artifactId>
            <version>v2-rev355-1.22.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.oauth-client</groupId>
            <artifactId>google-oauth-client</artifactId>
            <version>1.21.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.http-client</groupId>
            <artifactId>google-http-client-jackson2</artifactId>
            <version>1.21.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.oauth-client</groupId>
            <artifactId>google-oauth-client-jetty</artifactId>
            <version>1.21.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.7</version>
        </dependency>
        <dependency>
            <groupId>com.google.truth</groupId>
            <artifactId>truth</artifactId>
            <version>0.29</version>
        </dependency>

        <!-- End BigQuery -->


        <!-- ok http -->
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>3.8.1</version>
        </dependency>

        <dependency>
            <groupId>com.mashape.unirest</groupId>
            <artifactId>unirest-java</artifactId>
            <version>1.4.9</version>
        </dependency>
        <!-- End ok http -->

        <!-- CSV -->

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>1.1</version>
        </dependency>

        <!-- End CSV -->

        <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.1.1</version>
        </dependency>

        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20160810</version>
        </dependency>

        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>5.0.1</version>
        </dependency>

EitanBe commented Sep 2, 2017

@SrinivasanTarget Hi here is the list of my dependencies:


<dependencies>
        <!--Tests cucumber and spring junit-->
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java8</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>LATEST</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>LATEST</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-spring</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-testng</artifactId>
            <version>1.2.5</version>
        </dependency>
        <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-apache</artifactId>
            <version>0.5.0</version>
        </dependency>
        <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-junit4</artifactId>
            <version>0.5.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>4.3.9.RELEASE</version>
        </dependency>
        <!-- End testing -->

        <!-- log4j -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${log4j2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${log4j2.version}</version>
        </dependency>

        <!-- End log4j -->

        <!-- jcraft for SSH-->
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>0.1.54</version>
        </dependency>

        <!-- End jcraft for SSH-->

        <!-- adb tool java object -->
        <dependency>
            <groupId>com.github.vidstige</groupId>
            <artifactId>jadb</artifactId>
            <version>1.0.1</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/jadb-1.0.0-SNAPSHOT.jar</systemPath>
        </dependency>

        <!-- End adb tool java object -->

        <!-- BigQuery -->
        <dependency>
            <groupId>com.google.apis</groupId>
            <artifactId>google-api-services-bigquery</artifactId>
            <version>v2-rev355-1.22.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.oauth-client</groupId>
            <artifactId>google-oauth-client</artifactId>
            <version>1.21.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.http-client</groupId>
            <artifactId>google-http-client-jackson2</artifactId>
            <version>1.21.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.oauth-client</groupId>
            <artifactId>google-oauth-client-jetty</artifactId>
            <version>1.21.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.7</version>
        </dependency>
        <dependency>
            <groupId>com.google.truth</groupId>
            <artifactId>truth</artifactId>
            <version>0.29</version>
        </dependency>

        <!-- End BigQuery -->


        <!-- ok http -->
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>3.8.1</version>
        </dependency>

        <dependency>
            <groupId>com.mashape.unirest</groupId>
            <artifactId>unirest-java</artifactId>
            <version>1.4.9</version>
        </dependency>
        <!-- End ok http -->

        <!-- CSV -->

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>1.1</version>
        </dependency>

        <!-- End CSV -->

        <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.1.1</version>
        </dependency>

        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20160810</version>
        </dependency>

        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>5.0.1</version>
        </dependency>
@EitanBe

This comment has been minimized.

Show comment
Hide comment
@EitanBe

EitanBe Sep 2, 2017

Hi guys,
I added manually:

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-remote-driver</artifactId>
    <version>3.5.3</version>
</dependency>

and it works now...

EitanBe commented Sep 2, 2017

Hi guys,
I added manually:

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-remote-driver</artifactId>
    <version>3.5.3</version>
</dependency>

and it works now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment