My pom.xml for all the relevant dependencies. No other dependencies use the below dependencies internally.
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.9</version>
</dependency>
<dependency>
<groupId>com.sparkjava</groupId>
<artifactId>spark-core</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>com.vonage</groupId>
<artifactId>client</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.11.0</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.11.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.11.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.1</version>
</dependency>
Java Code to initiate outbound voice call using vonage SDK.
VonageClient client = VonageClient.builder().applicationId(APPLICATION_ID).privateKeyContents(PRIVATE_KEY).build();
Ncco ncco = new Ncco(TalkAction.builder(MESSAGE).voiceName(VOICE_TYPE).build());
CallEvent callEvent=client.getVoiceClient().createCall(newCall(TO_NUMBER,FROM_NUMBER, ncco));
Exception thrown when executing the code.
java.lang.AbstractMethodError: Receiver class io.jsonwebtoken.impl.DefaultJwtBuilder does not define or inherit an implementation of the resolved method 'abstract io.jsonwebtoken.JwtBuilder signWith(java.security.Key, io.jsonwebtoken.SignatureAlgorithm)' of interface io.jsonwebtoken.JwtBuilder. at com.nexmo.jwt.JwtGenerator.generate(JwtGenerator.kt:49) ~[jwt-1.0.1.jar:?] at com.nexmo.jwt.Jwt.generate(Jwt.kt:44) ~[jwt-1.0.1.jar:?] at com.nexmo.jwt.Jwt.generate$default(Jwt.kt:43) ~[jwt-1.0.1.jar:?] at com.nexmo.jwt.Jwt.generate(Jwt.kt) ~[jwt-1.0.1.jar:?] at com.vonage.client.auth.JWTAuthMethod.apply(JWTAuthMethod.java:43) ~[client-6.0.0.jar:6.0.0] at com.vonage.client.AbstractMethod.applyAuth(AbstractMethod.java:127) ~[client-6.0.0.jar:6.0.0] at com.vonage.client.AbstractMethod.execute(AbstractMethod.java:73) ~[client-6.0.0.jar:6.0.0] at com.vonage.client.voice.CallsEndpoint.post(CallsEndpoint.java:57) ~[client-6.0.0.jar:6.0.0] at com.vonage.client.voice.VoiceClient.createCall(VoiceClient.java:61) ~[client-6.0.0.jar:6.0.0] at com.senpiper.core.listener.VoiceCallListener.listen(VoiceCallListener.java:37) ~[classes/:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
jjwt
. – Rouvin