You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Including the java-sdk as a dependency for a Spring Boot project builds properly, but results in a "NoSuchMethodError: Companion" exception at run-time when initializing an instance of the DaprHttp.
From investigation, it appears that this has to do with the okhttp library and version mismatches:
I am scratching my head why this happens since a standalone Spring Boot project does not include the okhttp library, so I am not sure why a Spring Boot + Java SDK project would downgrade this dependency, and I was unable to determine it using the Maven dependency tool.
Referencing the dependency explicitly does fix the problem. Two asks:
Investigate if there is a better way to resolve this issue.
Add a note to the README to help others avoid this issue.
The text was updated successfully, but these errors were encountered:
Duplicate of #515. You can work-around this by changing the Spring Boot version to one that uses a compatible OkHTTP version, or force a compatible OkHttp version in your project by adding the following dependency:
To add a bit more detail regarding your first question: I believe the OkHttp dependency that you see when you do have Spring Boot is "managed" by the Spring Boot "Bill of Materials".
Including the java-sdk as a dependency for a Spring Boot project builds properly, but results in a "NoSuchMethodError: Companion" exception at run-time when initializing an instance of the DaprHttp.
From investigation, it appears that this has to do with the okhttp library and version mismatches:
Without Spring Boot:
With Spring Boot:
Adding this explicit dependency to the POM fixed the problem:
I am scratching my head why this happens since a standalone Spring Boot project does not include the okhttp library, so I am not sure why a Spring Boot + Java SDK project would downgrade this dependency, and I was unable to determine it using the Maven dependency tool.
Referencing the dependency explicitly does fix the problem. Two asks:
The text was updated successfully, but these errors were encountered: