Skip to content

Failed to initialize FeatureHub client - Java Spring boot #36

Description

@chkp-talash

Hi,
I am using the java-client-sse package version 1.4 in my Java Spring boot project (Java 8) and I am getting an error while running init() on EdgeFeatureHubConfig instance.
I am suspecting it related to the fact that I have another package in my project that uses okhttp3 with version 3.8.1.
Does it mean that I cannot use this sdk? is there any solution except for using restApi?

The error:

2024-02-26 09:44:55 ERROR [main] i.f.c.EdgeFeatureHubConfig - Failed to initialize FeatureHub client
java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: tried to access class okhttp3.EventListener from class okhttp3.internal.sse.RealEventSource
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) ~[?:1.8.0_111]
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895) ~[?:1.8.0_111]
	at io.featurehub.client.EdgeFeatureHubConfig.init(EdgeFeatureHubConfig.java:78) ~[java-client-core-3.3.jar:?]
	at com.checkpoint.casb.client.FeatureHubClient.<init>(FeatureHubClient.java:15) ~[feature-flag-wrapper-0.0.10.jar:?]
	at com.checkpoint.casb.client.LaunchDarklyClientImpl.init(LaunchDarklyClientImpl.java:79) ~[feature-flag-wrapper-0.0.10.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
.... 

Thanks

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