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

fix(gofeatureflag): fix java.lang.NoClassDefFoundError #839

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

thomaspoignant
Copy link
Member

This PR

Not sure why, but the import org/apache/hc/core5/http/ContentType was working fine in the contrib repo BUT the dependency is not working on the built version.

Removing the link to this lib to be sure that we have no more NoClassDefFoundError errors.

org.gofeatureflag.integrationtests.ProviderTests.authenticatedRelayProxyInvalidToken -- Time elapsed: 0.004 s <<< ERROR!
java.lang.NoClassDefFoundError: org/apache/hc/core5/http/ContentType
	at dev.openfeature.contrib.providers.gofeatureflag.controller.GoFeatureFlagController.evaluateFlag(GoFeatureFlagController.java:138)
	at dev.openfeature.contrib.providers.gofeatureflag.GoFeatureFlagProvider.getEvaluation(GoFeatureFlagProvider.java:218)
	at dev.openfeature.contrib.providers.gofeatureflag.GoFeatureFlagProvider.getBooleanEvaluation(GoFeatureFlagProvider.java:80)
	at dev.openfeature.sdk.OpenFeatureClient.createProviderEvaluation(OpenFeatureClient.java:180)
	at dev.openfeature.sdk.OpenFeatureClient.evaluateFlag(OpenFeatureClient.java:123)
	at dev.openfeature.sdk.OpenFeatureClient.getBooleanDetails(OpenFeatureClient.java:223)
	at dev.openfeature.sdk.OpenFeatureClient.getBooleanDetails(OpenFeatureClient.java:217)
	at org.gofeatureflag.integrationtests.ProviderTests.authenticatedRelayProxyInvalidToken(ProviderTests.java:394)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: java.lang.ClassNotFoundException: org.apache.hc.core5.http.ContentType
	... 11 more

Copy link
Collaborator

@Kavindu-Dodan Kavindu-Dodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thomaspoignant thomaspoignant force-pushed the fix-no-class-def-found branch from 376c24b to f3aa3e6 Compare June 20, 2024 14:46
@thomaspoignant thomaspoignant merged commit 6859fa6 into main Jun 20, 2024
4 checks passed
@thomaspoignant thomaspoignant deleted the fix-no-class-def-found branch June 20, 2024 14:51
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

Successfully merging this pull request may close these issues.

5 participants