Skip to content

InitializaionError when using Java Sdk 1.6.1 #19

@vardhaman-niro

Description

@vardhaman-niro

Error : Unsatisfied dependency expressed through field 'statSigClientUtil'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'statSigClientUtil': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/google/gson/ToNumberPolicy

method :

@PostConstruct
  public void init() throws ExecutionException, InterruptedException {
    try {

      Future<Void> initFuture = Statsig.initializeAsync(STAT_SIG_SECRET);
      log.info("Initialized stat-sig client");
    } catch (Exception e) {
      System.out.println("Exception " + e.getMessage());
      System.out.println(Arrays.toString(e.getStackTrace()));
    }

  }

build.gradle:

implementation 'com.statsig:serversdk:1.6.1'

gson librarry used in project is
implementation 'com.google.code.gson:gson:2.9.0'

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