← All tasks
javaapache/incubator-seata #7920Not a task: already works

java.lang.String cannot be converted to okhttp3.MediaType

envgap__apache__incubator-seata-7920

01 / FAILURE SIGNATURE

As reported upstream

Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project seata-common: Compilation failure: Compilation failure:
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
1d4e81113bc23197b883acbb62a19b74032d81fc
Manifest
dependencies/pom.xml
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

apache/incubator-seata #7920 · read the original issue
### Check Ahead

- [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.

- [ ] I am willing to try to fix this bug myself.


### Ⅰ. Issue Description

https://github.com/apache/incubator-seata/actions/runs/20753876763/job/59590388727
```
Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project seata-common: Compilation failure: Compilation failure: 
Error:  /Users/runner/work/incubator-seata/incubator-seata/common/src/main/java/org/apache/seata/common/util/HttpClientUtil.java:[108,30] no suitable method found for create(java.lang.String,okhttp3.MediaType)
Error:      method okhttp3.RequestBody.create(okhttp3.MediaType,java.lang.String) is not applicable
Error:        (argument mismatch; java.lang.String cannot be converted to okhttp3.MediaType)
Error:      method okhttp3.RequestBody.create(okhttp3.MediaType,okio.ByteString) is not applicable
Error:        (argument mismatch; java.lang.String cannot be converted to okhttp3.MediaType)
Error:      method okhttp3.RequestBody.create(okhttp3.MediaType,byte[]) is not applicable
Error:        (argument mismatch; java.lang.String cannot be converted to okhttp3.MediaType)
Error:      method okhttp3.RequestBody.create(okhttp3.MediaType,java.io.File) is not applicable
Error:        (argument mismatch; java.lang.String cannot be converted to okhttp3.MediaType)
```
I suspect that different versions of Spring Boot depend on different versions of OkHttp, which could cause compatibility issues. To avoid conflicts arising from changes in Spring Boot versions, we should manually specify a fixed, reliable version of OkHttp 3.

### Ⅱ. Describe what happened

_No response_

### Ⅲ. Describe what you expected to happen

_No response_

### Ⅳ. How to reproduce it (as minimally and precisely as possible)

_No response_

### Ⅴ. Anything else we need to know?

_No response_

### Ⅵ. Environment

_No response_
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]