Coder Social home page Coder Social logo

quandl4j's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

quandl4j's Issues

SearchRequest using database_code

According to the docs here: https://www.quandl.com/docs/api#dataset-search we can use the search endpoint to get all the datasets within a database by hitting something like datasets.csv?database_code=WIKI. I'd like to submit a pull request enabling this functionality, unfortunately with the current implementation, the Query parameter is required even though it's not required according to the docs. In order to enable the database only query we'd need the Query parameter to not be required.

I'm not sure if there's a nice way to enable this workflow with the exception of breaking backwards compatibility. What are your thoughts on doing that? I'm also happy to try something else if you have a better suggestion.

Why there is no implimentaion for exclude_headers=true

I am having issue with mismatch of length of string and header. Just wondering why exclude_headers=true is not implemented.

For example :
https://www.quandl.com/api/v1/datasets/WIKI/AAPL.json?column=4&collapse=quarterly&transformation=normalize
Is implemented

But adding another param exclude_headers=true is not possible with current api ?
https://www.quandl.com/api/v1/datasets/WIKI/AAPL.csv?column=4&collapse=quarterly&transformation=normalize&exclude_headers=true

Drop Java 7 support

@jimmoores what do you think about dropping Java 7 support? Is there a reason we still have it or a timeline on when you think we might be able to drop it?

The tablesaw project requires Java 8 support, so I removed Java 7 support for the moment. One option would be to add Java 7 support back to core and make only the tablesaw sub-project require Java, but this would make the build more complicated. Or I can finish removing Java 7 support and remove the ThreeTen backport dependency, which would be nice as it would reduce the number of dependencies that we have.

New multi-metadata endpoint

Quandl is deprecating the API endpoint called in public static MultiMetaDataRequest of(final List<String> quandlCodes)

You can now retrieve metadata for all time-series in a data feed using a single API call, including:

  • code
  • name
  • description
  • refreshed_at
  • from_date
  • to_date

Example: https://www.quandl.com/api/v3/databases/bcip/metadata?api_key={yourAPIKey} This retrieves all the metadata for the Quandl BCIP feed.This widely requested feature will make it quick and easy for you to retrieve all metadata for a given feed.

If you previously used the codes route to accomplish this, please read on: As of September 4, 2018, this new route will replace the codes route, which will no longer be supported.This new route dramatically improves upon use of the codes route to generate metadata, by offering more metadata and a significant speed advantage. You no longer need to page through the results retrieved by our search API in order to get metadata. Additionally, the metadata gets updated as soon as the feed does (as opposed to once per day with the codes file). Kindly update your scripts and let us know if you have any questions. We will send out a reminder email shortly before the deprecation date.

Why does dataset retrieval use api/v1?

Hey Jim,

I saw that session.getDataSet() will query api/v1, same for getMetaData().
session.search() will use api/v3. Why do the former use v1?
Any plans to support v3 for all requests?

Thanks,
Stefan

Compile dependency com.opengamma.external.json:json is not available in maven central repository

Hello. I've tried to use your library in my application with Gradle build system (with maven central repository) but I got this error during compilation:

Could not resolve all dependencies for configuration ':app-core:compile'.

Could not resolve com.opengamma.external.json:json:1.0.0.v20101106.
Required by:
com.haulmont.guardian:app-core:0.1-SNAPSHOT > com.jimmoores:quandl:1.2.0
java.lang.NullPointerException (no error message)

I've checked, and, indeed, there isn't no library with groupId "com.opengamma.external.json" available in maven central: http://search.maven.org/#search%7Cga%7C1%7Ccom.opengamma.external.json

Also: http://mvnrepository.com/artifact/com.opengamma.external.json/json/1.0.0.v20101106

RESTEASY004655 error

Hello,

First, thank you for this very useful library.

I tested Quandl4j within a java EE application and got the error attached when several clients were requesting data:

log-RESTEASY004655.txt

The error can be fixed closing the response object in DefaultRESTDataProvider#getTabularResponse once it is used.

My environment:
JDK 1.8.0 update 102
Application server : Widlfly 10.1.0.Final
OS : Windows 7
Quandl4j : 1.4.0

Thanks and regards,
Olivier

Any where I can set READ_TIMEOUT Property?

Hi,I am using your package to access data from Quandl
VERSION:
compile group: 'com.jimmoores', name: 'quandl', version: '1.3.0'
I will access data every 10 minutes,but i found the thread waited for a long time,how can i set the timeout value?

I dump the jvm thread.

at com.jimmoores.quandl.QuandlSession.getDataSet(QuandlSession.java:159)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:652)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:655)
at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:652)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:227)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at org.glassfish.jersey.client.HttpUrlConnector._apply(HttpUrlConnector.java:321)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:224)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
- locked <0x00000000cd9c91a0> (a sun.net.www.protocol.https.DelegateHttpsURLConnection)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
- locked <0x00000000cd9c91a0> (a sun.net.www.protocol.https.DelegateHttpsURLConnection)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
- locked <0x00000000cd9c8098> (a java.lang.Object)
- locked <0x00000000cd9c80d8> (a java.lang.Object)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.InputRecord.read(InputRecord.java:532)
at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:593)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.net.SocketInputStream.read(SocketInputStream.java:170)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)

Can i use this with my android project, please help

I am trying to use it with my android project and its not working. I added the dependencies like this:

repositories {
    // Or use mavenCentral(). I prefer new and cool shit + HTTPS, hence jcenter():
    jcenter()
}

repositories {
    maven {
        // Quandl4j has a dependency not in Maven: 'com.opengamma.external.json:json:1.0.0.v20101106'
        // Source of this URL: https://github.com/jimmoores/quandl4j/blob/master/pom.xml
        url "http://maven.opengamma.com/nexus/content/groups/public"
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile project(':payUMoneysdk')
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.android.support:recyclerview-v7:23.4.0'
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
    testCompile 'junit:junit:4.12'
    compile 'com.jimmoores:quandl:1.3.0'
}

It gives this error while building:
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class

Exception documentation in JavaDoc missing

While I appreciate the different kinds of exception that the API throws, I can't find them documented in the JavaDoc in the source files. Am I missing something? Or if they are really not there, mind if I add them and create a pull request? Might take a while though, don't have a big time budget right now.

Quandl4J 1.1.0 and HTTPS requirement

I just a spent a couple of days investigating why Quandl4J 1.1.0 works with Jersey and didn't work with CXF. It turns out the base URI in Quandl4J is "quandl.com", however the Quandl servers SSL/TLS certificate is on "www.quandl.com" so the server redirects there. Jersey seems to auto-redirect, while CXF by default does not auto-direct resulting in a 301 HTTP response. Please update the code so that the base URI is "https://www.quandl.com/api/v1" rather than "https://quandl.com/api/v1" as this is the actual secure URL.

As a work-around CXF users can use the following config to get Quandl4J to work with the CXF JAX-RS provider:

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:http="http://cxf.apache.org/transports/http/configuration"
    xmlns:sec="http://cxf.apache.org/configuration/security"
    xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration
           http://cxf.apache.org/schemas/configuration/http-conf.xsd
           http://cxf.apache.org/configuration/security
           http://cxf.apache.org/schemas/configuration/security.xsd
           http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd">

    <http:conduit name="https://quandl.com/.*">
        <http:client AutoRedirect="true" Connection="Keep-Alive"/>
    </http:conduit>

</beans>

Caching

Hi, happy user of quandl4j here...

My application requests data at startup, and usually this is the same data as in a previous session. It delays startup and causes unnecessary data queries. Caching would be a solution. I plan to extend SessionBuilder with something like withCacheDir(String) to point to a directory where raw data from quandl is put. Furthermore, add DataSetRequest.Builder.withRetentionPolicy(RetentionPolicy)

A RetentionPolicy is then something to describe when you consider data to be too old. An example of a RetentionPolicy called Day could be something that implies that if the cached data is absent or of a different date than today, data will be fetched from quandl. Otherwise, the cached data is used. Other implemententations could be Week, Month (with their obvious meanings), and WeekDay. WeekDay will consider the cached data up to date if it was downloaded today, or, if today is a Saturday or Sunday, the data was downloaded last Friday.

What do you think of this approach, and are you interested in the code?

Regards,

Mark Smeets.

Varying return types (TabularResult, Tablesaw Table, String, etc.)

@jimmoores I was curious if you've seen tablesaw. It's basically an alternative to TabularResult that's much more powerful.

I'd like to fetch data and load it into a dataframe. There are a few options. I could add methods to spit out CSV so that I can then load the CSV into tablesaw myself, we could create a quand4j-tablesaw module, or if you'd be interested we could replace TabularResult with a tablesaw's Table and make it a core dependency.

java 9 MetaDataRequest

After resolving issue #41 for reasons unbeknownst to me the meta data in the json object is wrapped in a "dataset" object so that the following temporary workaround is required to make my code work:

public static MetaDataResult getMetaData(ClassicQuandlSession session, String database, String table){
    String quandlCode = getQuandlCode(database, table);
    MetaDataRequest request = MetaDataRequest.of(quandlCode);
    MetaDataResult metaData = session.getMetaData(request);
    if(metaData.getQuandlCode() == null){
        try{
            metaData = MetaDataResult.of(metaData.getRawJSON().getJSONObject("dataset"));
        }catch(JSONException e){
            e.printStackTrace();
        }
    }
    return metaData;
}

NoClassDefFoundError: QuandlSession or NoClassDefFoundError: ClassicQuandlSession

Hi,

I'm trying to use your lib in Android Studio in a Java module that I made. I use gradle to get your code and then when I try to run either Example1 or Example2 I get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/jimmoores/quandl/QuandlSession
at com.demo.constant.volatilecommodities.Volatile.main(Volatile.java:14)
Caused by: java.lang.ClassNotFoundException: com.jimmoores.quandl.QuandlSession
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more

With either QuandlSession or ClassicQuandlSession.

What do I do wrong?

Fix the build

The build has multiple problems and you can see the most recent commits failing

  • It's running versions of Oracle JDK that are no longer supported or available. Because these versions are no longer available we're getting the corresponding version of OpenJDK instead. We should switch the build to specify OpenJDK since that's what we'll be getting regardless
  • It's specified to run oraclejdk9 twice. Once with certificates fix and once without

[2.0.0] Maven pom not downloading core and tablesaw

When I try to install I get

_remote.repositories
quandl-2.0.0.pom.sha1
quandl-2.0.0.pom

in ~/.m2/repository/com/jimmoores/quandl/2.0.0 but nothing else under ~/.m2/repository/com/jimmoores/

Maven 3.5
MacOS 10.12.6

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Exception java.lang.IllegalStateException: InjectionManagerFactory not found

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'

Automatic Iteration of Paged Search Results

Hey Jim,

I'd like to propose building in some facilities for automatic iteration of paged results in order to operate on a complete set of results when the responses are paged. The impetus for this is once again the search endpoint. I'd love to be able to get all of the results for a given database and for many databases which have thousands of datasets the limitation of 100 results at a time results in tons of paging needing to be done.

I'd love to build in functionality to handle this transparently and automatically page through results in serial or parallel. I imagine this as an AutoPagingSearchResult class which is returned by an "autoPagingSearch" method on QuandlSession. It would take in an AutoPagingSearchRequest which is similar to SearchRequest but leaves out the page number field and instead has the user specify serial/parallel and, if necessary, number of threads for the parallel requests.

What do you think of this proposal?

Best,
Hamel

Gradle Build error + Program type already present: javax.inject.Inject error

Hello all,

I am currently trying to use the Quandl4J library in Android Studio. Unfortunately, when I try to compile my programme, there is a Gradle build error with the error message :

" Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug"

that is caused by :

" Caused by: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:"

In addition, an Android issue pops out:

"Program type already present: javax.inject.Inject
Message{kind=ERROR, text=Program type already present: javax.inject.Inject, sources=[Unknown source file], tool name=Optional.of(D8)}"

I have actually followed the instructions from this [link]
(https://stackoverflow.com/questions/46053902/dex-error-on-android-studio-3-0-beta4) but to no avail.

Has anybody encountered a similar error? If so, what is their solution for this?
Thank you very much for your help!

java 9 jigsaw compile failure

When attempting to modularize my quandl library which depends on this one I ran into the error

'Invalid module name: '20090211' is not a Java identifier'

I was able to modify the manifest in the problem library to fix this issue.

Details can be found at:
FasterXML/jackson-datatype-json-org#12

My fix is more or less just a hack. Unless I am an idiot (which i haven't ruled out) I believe the development of the json dependency is dead. I don't know where to go to propose a patch. Therefore I don't know how to come up with a long term solution other than changing dependencies, which seems expensive.

I realize that this is not specifically a quandle4j issue as much as an issue of one of its dependencies, however information is power.

Edit: it would appear that FasterXML may solve this issue them selves, TBD

SSLHandshake issue after connection timeout

Hi, I am using your package to access data from Quandl

Last weekend, due to some unknown issue, the connection timed out whilst running the following code:

public void retrieveColumns(LocalDate startDate, LocalDate endDate, String mySymbol) {
    QuandlSession session = QuandlSession.create("My Key");
    TabularResult tabularResult = session.getDataSet(
                    DataSetRequest.Builder
                        .of(mySymbol)
                        .withFrequency(Frequency.DAILY)
                        .withStartDate(getQuandleDate(startDate))
                        .withEndDate(getQuandleDate(endDate))
                        .withSortOrder(SortOrder.DESCENDING)
                        .build()
                );
}

I assume this was due to a blip in the internet, or Quandl experiencing downtime. What was interesting was what happened after. From this point on, every time our application tried to make a request, we got the following error:

javax.ws.rs.ProcessingException: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching www.quandl.com found.
    at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:229) ~[jersey-client-2.8.jar:na]
    at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:224) ~[jersey-client-2.8.jar:na]
    at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:655) ~[jersey-client-2.8.jar:na]
    at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:652) ~[jersey-client-2.8.jar:na]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jersey-common-2.8.jar:na]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jersey-common-2.8.jar:na]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:228) ~[jersey-common-2.8.jar:na]
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424) ~[jersey-common-2.8.jar:na]
    at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:652) ~[jersey-client-2.8.jar:na]
    at com.jimmoores.quandl.util.DefaultRESTDataProvider.getTabularResponse(DefaultRESTDataProvider.java:89) ~[quandl-1.3.0.jar:na]
    at com.jimmoores.quandl.QuandlSession.getDataSet(QuandlSession.java:159) ~[quandl-1.3.0.jar:na]
    ...
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative DNS name matching www.quandl.com found.
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) ~[na:1.8.0_71]
    ...
Caused by: java.security.cert.CertificateException: No subject alternative DNS name matching www.quandl.com found.
    at sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:204) ~[na:1.8.0_71]
    …

Once we restarted the application, things worked fine again. What I want to know is, why did this issue occur, and if there is anything I can do resolve this issue programmatically if it happens again. I emailed Quandl support, but they basically said "Everything looks fine to us, contact us if it happens again."

Obviously, I'd like to be a little more proactive about it. I'm sorry I can't give you a reproducible sample for this, the events that caused it seem to be out of my hands. Any help would be appreciated.

HTTP Error 301 - Moved Permanently (RESTEasy incompatibility)

I am working with quandl4J on Wildfly 8.2.0.final, which implements jax-rs with RESTEasy. When I perform a dataset request, I get

com.jimmoores.quandl.util.QuandlRuntimeException: Response code to https://quandl.com/api/v1/datasets/ODA/PBARL_USD.csv?auth_token=sxfx7C8dRr2Mi9_Kj2UH&rows=1 was Moved Permanently

which stands for HTTP 301 error.

It a static environment, it uses Jersey implementation and everything works fine.

This link says the problem is related to QuandlSession's API_BASE_URL, that misses www.

private static final UriBuilder API_BASE_URL = UriBuilder.fromPath("https://quandl.com/api/v1");

Maybe Jersey automatically treats 301 and redirects to the new address.

I strongly advise to add www to base url.

Add method that splits out multiple data set results into separate TabularResults

Currently, the results from a multiple data set are all in a big table with oddly named rows (SYMBOL - FIELD). These could be split out automatically to get a method in QuandlSession like:

Map<String, TabularResult> getMultipleDataSets(MultiDataSetRequest request)

by splitting the field header on (see getMulitpleHeaderDefinition() for logic)

Backward asserts

All the asserts in URLGenerationTests swap the expected and actual results. E.g.:

Assert.assertEquals(TEST_TABULAR_RESULT, tabularResult);

One fix would be to change the order of the asserts. Another fix would be to switch to Junit, which is much more common and expects the arguments in the order they are given here

OpenGamma no longer publish old artifacts via maven.opengamma.com

We have been using quandl4j for a while without problem but a new employee had issues. The reason was we all have com.opengamma.external.json cached in our local .m2 repositories but it seems maven.opengamma.com is no longer publishing old artifacts like this.

OpenGamma now seems to have a space on bintray and they also seem to be publishing their main products, like Strata, to Maven Central (e.g. see the Strata README).

I just tried building quandl4j locally but without much luck due its dependence on maven.opengamma.com. I suggest clearing out ~/.m2/repository/com/opengamma and seeing if you have the same issues (if you have something like Sonatype Nexus proxying remote repos for you then you'll obviously have to clear out things there too).

Getting SSL Handshake exception. PKIX path building failed: unable to find valid certification path to requested target

Hello,

String quandlCode = "WWDI/USA_NY_GDP_MKTP_CD";
ClassicQuandlSession session = ClassicQuandlSession.create();
MetaDataResult metaData = session.getMetaData(MetaDataRequest.of(quandlCode));
logger.info(metaData.toPrettyPrintedString());
TabularResult tabularResult = session.getDataSet(DataSetRequest.Builder.of(quandlCode).build());
logger.info(tabularResult.toPrettyPrintedString());

I am getting the following error while making above calls. I have already added the necessary certificates to my jdk/jre keystore but no luck.

openssl s_client -connect quandl.com:443>public.crt (copy content including begin and end certificate lines)
C:\Program Files\Java\jdk1.8.0_141\bin>keytool -import -alias quandl.com -keystore ../jre/lib/security/cacerts -file public.crt (if prompted for a passport type: changeit)
keytool -list -v -keystore $JAVA_HOME/jre/lib/security/cacerts

and here is the exception that is getting thrown from the java app.
............
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397) ~[na:1.8.0_141]
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302) ~[na:1.8.0_141]
at sun.security.validator.Validator.validate(Validator.java:260) ~[na:1.8.0_141]
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) ~[na:1.8.0_141]
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) ~[na:1.8.0_141]
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) ~[na:1.8.0_141]
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1496) ~[na:1.8.0_141]
... 43 common frames omitted
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) ~[na:1.8.0_141]
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) ~[na:1.8.0_141]
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) ~[na:1.8.0_141]
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392) ~[na:1.8.0_141]
... 49 common frames omitted

Exception in thread "main" java.lang.NoClassDefFoundError: javax/ws/rs/core/UriBuilder

Exception in thread "main" java.lang.NoClassDefFoundError: javax/ws/rs/core/UriBuilder
at com.jimmoores.quandl.QuandlSession.(QuandlSession.java:41)
at com.jimmoores.quandl.example.Example1.run(Example1.java:21)
at com.jimmoores.quandl.example.Example1.main(Example1.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.ClassNotFoundException: javax.ws.rs.core.UriBuilder
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 8 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.