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

[Bug]: Missing jersey-hk2 dependency in build.gradle #53

Open
itsJamilAhmed opened this issue Sep 10, 2024 · 0 comments
Open

[Bug]: Missing jersey-hk2 dependency in build.gradle #53

itsJamilAhmed opened this issue Sep 10, 2024 · 0 comments
Labels

Comments

@itsJamilAhmed
Copy link

Bug Description

Exception triggers when running samples:

Creating Object: tutorialUser Exception in thread "main" java.lang.IllegalStateException: InjectionManagerFactory not found. at org.glassfish.jersey.internal.inject.Injections.lambda$lookupInjectionManagerFactory$0(Injections.java:74) at java.util.Optional.orElseThrow(Optional.java:290) at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:74) at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:44) at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:412) at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:317) at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:807) at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:262) at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:119) at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:88) at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:84) at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:75) at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:421) at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:327) at com.solace.labs.sempclient.lib.ApiClient.invokeAPI(ApiClient.java:682) at com.solace.labs.sempclient.api.MsgVpnApi.createMsgVpnClientUsernameWithHttpInfo(MsgVpnApi.java:1876) at com.solace.labs.sempclient.api.MsgVpnApi.createMsgVpnClientUsername(MsgVpnApi.java:1823) at com.solace.samples.BasicOperationsSample.createObjectUsingPost(BasicOperationsSample.java:74) at com.solace.samples.BasicOperationsSample.main(BasicOperationsSample.java:166)

Fix:

Add the following dependency in build.gradle

implementation "org.glassfish.jersey.inject:jersey-hk2:$jersey_version"

Expected Behavior

No exception when running sample

Steps to Reproduce

Build repo and then run sample: ./basicOperationsSample

Solace Product

Other

Solace Broker version

Any

Solace API

Java

Solace API version

Any

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

No branches or pull requests

1 participant