News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Ringout example throws exception java.lang.NoSuchMethodError
Tags: getting started
Feb 10, 2022 at 6:58pm   •   4 replies  •  0 likes
Awadh Pandey

As I'm going through the ringout tutorials and get java.lang.NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType) exception

I am running the code in Spring Boot with Java 15.0.2

<dependency>
<groupId>com.ringcentral</groupId>
<artifactId>ringcentral</artifactId>
<version>2.6.0</version>
</dependency>

It seems that this error is related to function okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType) , but I am not making any such call. Perhaps SDK is calling this function internally. How should I resolve it?

4 Answers
answered on Feb 11, 2022 at 5:14pm  

Hi Tyler,
Thank you for your time and response.

My okhttp is downloaded as part of Spring boot 2.4.11 and it is <okhttp3.version>3.14.9</okhttp3.version>
So it is not a newer version than okhttp 4.9.1.

Let me create a simple java project and I will upload the link.


 0
answered on Feb 11, 2022 at 12:46pm  

We tested both Java 11 and Java 17, both are LTS versions. We cannot reproduce the issue.

It is appreciated if you could create a simple project to reproduce it and share it with me. Thanks


 0
on Feb 11, 2022 at 12:47pm   •  0 likes

Ref: https://github.com/ringcentral/ringcentral-java/issues/30

answered on Feb 11, 2022 at 8:29am  

Yes I can see the function call in the source code of the SDK https://github.com/ringcentral/ringcentral-java/blob/master/src/main/java/com/ringcentral/RestClient.java#L186-L190

But all the test cases still pass. I am thinking about how can I reproduce the issue.


 0
on Feb 11, 2022 at 8:31am   •  0 likes

I think maybe it has something to do with Java 15. I have created a ticket to track it: https://github.com/ringcentral/ringcentral-java/issues/30

answered on Feb 11, 2022 at 12:48pm  

It is likely that you are using a newer version of okhttp. The SDK is tested against okhttp 4.9.1


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us