Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InitializaionError when using Java Sdk 1.6.1 #19

Open
vardhaman-niro opened this issue Sep 20, 2023 · 1 comment
Open

InitializaionError when using Java Sdk 1.6.1 #19

vardhaman-niro opened this issue Sep 20, 2023 · 1 comment

Comments

@vardhaman-niro
Copy link

vardhaman-niro commented Sep 20, 2023

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'

@tore-statsig
Copy link
Contributor

2.9.0 is the right version, does you project also use other versions of gson that could be conflicting here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants