irufus / gdax-java

Java based wrapper for Coinbase Pro (Formerly known as GDAX API and Coinbase Exchange API)
MIT License
177 stars 131 forks source link

Null Pointer Exception #26

Closed lumyus closed 5 years ago

lumyus commented 6 years ago

Hey,

While using your library I noticed a null pointer exception when trying to execute a "AccountService.getAccounts()" method. I've put my secret, API key and passphrase into the application.yml. It seems like the "exchange" variable is null.

By the way: I compiled your library into a .jar file and included it into my personal project. (I checked and can confirm that API key etc. are inside the .jar file)

Any idea on whats going wrong?

Thanks for the library!

sunnyaditya commented 6 years ago

@irufus Any solution for this issue? I am also facing the same issue.

robevansuk commented 6 years ago

This clearly needs better flexibility - will look at this after the working orderbook is implemented.

irufus commented 5 years ago

You would need to create a Profile: Here's order of override for reference: https://www.baeldung.com/spring-yaml

Also adding active profile: https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html