Hi Growthbook Team, We are currently evaluating G...
# ask-questions
f
Hi Growthbook Team, We are currently evaluating GrowthBook open feature provider and working on a PoC using java provider and We have used following maven dependencies
<dependencies>
<dependency>
<groupId>com.github.growthbook</groupId>
<artifactId>growthbook-openfeature-provider-java</artifactId>
<version>0.0.2</version>
</dependency>
<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>sdk</artifactId>
<version>1.16.0</version>
</dependency>
<dependency>
<groupId>com.github.growthbook</groupId>
<artifactId>growthbook-sdk-java</artifactId>
<version>0.9.92</version>
</dependency>
</dependencies>
We have created a feature flag named greet-message Growthbook sdk is correctly pulling json at the application start up as per following log lines Features have been refreshed
Copy code
{
  "greet-message": {
    "defaultValue": "Guest",
    "rules": [
      {
        "id": "fr_gpbng1hmeiel440",
        "condition": {
          "host": "US"
        },
        "force": "American"
      }
    ]
  }
}
But getting following error at the feature evaluation time 2025-08-19T204814.530+05:30 ERROR 56754 --- [growthbook-demo] [ctor-http-nio-2] growthbook.sdk.java.FeatureEvaluator : TypeToken type argument must not contain a type variable; captured type variable ValueType declared by class growthbook.sdk.java.FeatureRule See https://github.com/google/gson/blob/main/Troubleshooting.md#typetoken-type-variable java.lang.IllegalArgumentException: TypeToken type argument must not contain a type variable; captured type variable ValueType declared by class growthbook.sdk.java.FeatureRule See https://github.com/google/gson/blob/main/Troubleshooting.md#typetoken-type-variable at com.google.gson.reflect.TypeToken.verifyNoTypeVariable(TypeToken.java:130) ~[gson-2.13.1.jar:na] at com.google.gson.reflect.TypeToken.getTypeTokenTypeArgument(TypeToken.java:103) ~[gson-2.13.1.jar:na] at com.google.gson.reflect.TypeToken.<init>(TypeToken.java:74) ~[gson-2.13.1.jar:na] at growthbook.sdk.java.FeatureRule$1.<init>(FeatureRule.java:195) ~[growthbook-sdk-java-0.9.92.jar:na] at growthbook.sdk.java.FeatureRule.deserialize(FeatureRule.java:195) ~[growthbook-sdk-java-0.9.92.jar:na] at growthbook.sdk.java.FeatureRule.deserialize(FeatureRule.java:34) ~[growthbook-sdk-java-0.9.92.jar:na] at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:95) ~[gson-2.13.1.jar:na] at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) ~[gson-2.13.1.jar:na] Managed to find that this error is throwing at the following line in FaetureEvaluator class of growth book java sdk
Copy code
Feature<ValueType> feature = (Feature)this.jsonUtils.gson.fromJson(featureJson, Feature.class);
Please kindly help us to resolve this issue.
👀 1