Skip to content

示例JWTOAuthExample 运行抛异常 #147

@Aiden-Wang

Description

@Aiden-Wang
   <dependency>
        <groupId>com.coze</groupId>
        <artifactId>coze-api</artifactId>
        <version>0.4.2</version>
    </dependency>

按照github的示例运行,在以下部分抛出异常
try { OAuthToken resp = oauth.getAccessToken(); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); }
Exception in thread "main" java.lang.NoSuchMethodError: 'io.jsonwebtoken.JwtBuilder io.jsonwebtoken.JwtBuilder.signWith(java.security.Key, io.jsonwebtoken.SignatureAlgorithm)'
at com.coze.openapi.service.auth.DefaultJWTBuilder.generateJWT(DefaultJWTBuilder.java:25)
at com.coze.openapi.service.auth.JWTOAuthClient.doGetAccessToken(JWTOAuthClient.java:114)
at com.coze.openapi.service.auth.JWTOAuthClient.getAccessToken(JWTOAuthClient.java:52)
at com.fx.ai.coze.JWTOAuthExample.main(JWTOAuthExample.java:73)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions