jimmoores / quandl4j

Java wrapper for Quandl REST API
quandl4j.org
Apache License 2.0
78 stars 22 forks source link

Exception java.lang.IllegalStateException: InjectionManagerFactory not found #49

Open vikingbrain opened 5 years ago

vikingbrain commented 5 years ago

I'm using the library and I'm getting this exception running the examples in the source at "rel/v2.0.0" using java 1.8:

Exception in thread "main" java.lang.IllegalStateException: InjectionManagerFactory not found. at org.glassfish.jersey.internal.inject.Injections.lambda$lookupInjectionManagerFactory$0(Injections.java:98) at java.util.Optional.orElseThrow(Optional.java:290) at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:98) at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:68) at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:432) at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:341) at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:826) at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:285) at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:143) at org.glassfish.jersey.client.JerseyInvocation.(JerseyInvocation.java:112) at org.glassfish.jersey.client.JerseyInvocation.(JerseyInvocation.java:99) at org.glassfish.jersey.client.JerseyInvocation$Builder.buildGet(JerseyInvocation.java:218) at org.glassfish.jersey.client.JerseyInvocation$Builder.buildGet(JerseyInvocation.java:171) at com.jimmoores.quandl.processing.AbstractRESTDataProvider.getResponse(AbstractRESTDataProvider.java:52) at com.jimmoores.quandl.processing.tablesaw.JSONTableSawRESTDataProvider.getTabularResponse(JSONTableSawRESTDataProvider.java:42) at com.jimmoores.quandl.processing.tablesaw.JSONTableSawRESTDataProvider.getTabularResponse(JSONTableSawRESTDataProvider.java:13) at com.jimmoores.quandl.generic.GenericQuandlSession.getDataSet(GenericQuandlSession.java:97) at com.jimmoores.quandl.tablesaw.example.Example7.run(Example7.java:23) at com.jimmoores.quandl.tablesaw.example.Example7.main(Example7.java:34)

But now I can run the samples using the library, I've needed to add the dependency compile 'org.glassfish.jersey.inject:jersey-hk2:2.26'