WebFlight / JWT

Mendix JWT module
Apache License 2.0
0 stars 4 forks source link

No suitable method found for withClaim(String,Long) #1

Closed vicam001 closed 6 years ago

vicam001 commented 6 years ago

Hi,

After adding the JWT module, version 1.2.1, I try to run the Mendix project and I get the following set of errors:

[]\javasource\jwt\actions\GenerateJWT.java:134: error: no suitable method found for withClaim(String,Long) [javac] builder.withClaim(claimLong.getClaim(), claimLong.getValue())

[javac]                        ^
[javac]     method Builder.withClaim(String,Boolean) is not applicable
[javac]       (argument mismatch; Long cannot be converted to Boolean)
[javac]     method Builder.withClaim(String,Integer) is not applicable
[javac]       (argument mismatch; Long cannot be converted to Integer)
[javac]     method Builder.withClaim(String,Double) is not applicable
[javac]       (argument mismatch; Long cannot be converted to Double)
[javac]     method Builder.withClaim(String,String) is not applicable
[javac]       (argument mismatch; Long cannot be converted to String)
[javac]     method Builder.withClaim(String,Date) is not applicable
[javac]       (argument mismatch; Long cannot be converted to Date)
[javac] []\javasource\jwt\helpers\AlgorithmParser.java:23: error: method RSA256 in class Algorithm cannot be applied to given types;
[javac]                 return Algorithm.RSA256(publicKey, privateKey);
[javac]                                 ^
[javac]   required: RSAKey
[javac]   found: RSAPublicKey,RSAPrivateKey
[javac]   reason: actual and formal argument lists differ in length
[javac] []\javasource\jwt\helpers\AlgorithmParser.java:25: error: method RSA384 in class Algorithm cannot be applied to given types;
[javac]                 return Algorithm.RSA384(publicKey, privateKey);
[javac]                                 ^
[javac]   required: RSAKey
[javac]   found: RSAPublicKey,RSAPrivateKey
[javac]   reason: actual and formal argument lists differ in length
[javac] []\javasource\jwt\helpers\AlgorithmParser.java:27: error: method RSA512 in class Algorithm cannot be applied to given types;
[javac]                 return Algorithm.RSA512(publicKey, privateKey);
[javac]                                 ^
[javac]   required: RSAKey
[javac]   found: RSAPublicKey,RSAPrivateKey
[javac]   reason: actual and formal argument lists differ in length
[javac] []\javasource\jwt\helpers\DecodedJWTParser.java:81: error: cannot find symbol
[javac]             if (claim.asLong() != null) {
[javac]                      ^
[javac]   symbol:   method asLong()
[javac]   location: variable claim of type Claim
[javac] []\javasource\jwt\helpers\DecodedJWTParser.java:83: error: cannot find symbol
[javac]                 publicClaimResponse.setValueLong(claim.asLong());
[javac]                                                       ^
[javac]   symbol:   method asLong()
[javac]   location: variable claim of type Claim
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 6 errors
Narev commented 6 years ago

You have checked your userlib folder? It is likely that you have a duplicate library that causes this issue.

mennodehaas commented 6 years ago

Closed due to inactivity.