GithubHelp home page GithubHelp logo

Comments (7)

saugion avatar saugion commented on May 28, 2024 1

I don't have the square dependency and it works. Which web3j version are you using? Could you paste the imports?

from web3j.

uluckyXH avatar uluckyXH commented on May 28, 2024 1

Encountered the same problem!

from web3j.

bofomike avatar bofomike commented on May 28, 2024

I don't have the square dependency and it works. Which web3j version are you using? Could you paste the imports?

Hey @saugion, it's in the desc of the issue, isn't it? 🤔

        <!-- Web3j - blockchain -->
        <dependency>
            <groupId>org.web3j</groupId>
            <artifactId>core</artifactId>
            <version>4.9.7</version>
        </dependency>

from web3j.

saugion avatar saugion commented on May 28, 2024

I'm sorry @bofomike you're right, i didn't notice it. Could you try to use the last version, https://mvnrepository.com/artifact/org.web3j/core/4.10.3?

from web3j.

bofomike avatar bofomike commented on May 28, 2024

I'm sorry @bofomike you're right, i didn't notice it. Could you try to use the last version, https://mvnrepository.com/artifact/org.web3j/core/4.10.3?

I did and it's not working neither.

2023-12-18 13:54:18.762 ERROR 14310 --- [nio-8080-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'] with root cause

java.lang.NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
	at org.web3j.protocol.http.HttpService.performIO(HttpService.java:153) ~[core-4.10.3.jar!/:na]
	at org.web3j.protocol.Service.send(Service.java:48) ~[core-4.10.3.jar!/:na]
	at org.web3j.protocol.core.Request.send(Request.java:87) ~[core-4.10.3.jar!/:na]

from web3j.

saugion avatar saugion commented on May 28, 2024

the square dependency should not be needed as already included in the web3j library. I have the feeling that one of the other libraries declared in the pom have another dependency with a different version, and this causes the issue. Could you provide a reproducible example, a sample project that I can clone? Thanks

from web3j.

bofomike avatar bofomike commented on May 28, 2024

Hey, I've updated spring version from 2.6.2 to 3.0.0 and it's all good 👍
That was tricky because it's an old micro-service I'm updating, but it's good in a long run anyway.
No need for okhttp3 dependency at all now 👌
I'm closing this.
Thanks!

from web3j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.