Skip to content

InitializaionError when using Java Sdk 1.6.1 #19

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions