Help me, please. I have okhttp3 and logging-interceptor 4.7.2 versions. I have java.lang.NoSuchMethodError: okhttp3.internal.Platform.log in "Okhttp Dispatcher" thread when I call ONVIF getDeviceInformation. If I set okhttp3 3.14.7 version I have java.lang.NoSuchFieldError: INSTANCE in "Okhttp Dispatcher" thread.
<modelVersion>4.0.0</modelVersion>
<groupId>prj.group.id</groupId>
<artifactId>art.id</artifactId>
<version>0.1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.0.M4</version>
</parent>
<properties>
<java-version>1.8</java-version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
<version>5.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-websocket</artifactId>
<version>5.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacv</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg</artifactId>
<version>4.2.1-1.5.2</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg-platform</artifactId>
<version>4.2.1-1.5.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
</dependency>
<dependency>
<groupId>be.teletask.onvif</groupId>
<artifactId>onvif</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.7.2</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>4.7.2</version>
</dependency>
<dependency>
<groupId>com.burgstaller</groupId>
<artifactId>okhttp-digest</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.2.2.RELEASE</version>
</plugin>
</plugins>
</build>
<repositories>
***
</repositories>
<pluginRepositories>
***
</pluginRepositories>
Error in onError method when I call getDeviceInformation
OnvifManager manager = new OnvifManager();
manager.setOnvifResponseListener( new OnvifResponseListener() {
@Override
public void onError(OnvifDevice device, int I, String s) {
System.out.println(s);
}
...
});
...
manager.getDeviceInformation(onvifDevice, (device, information) -> {
// Don't reach this code
information.getModel();
});
