<p>Well the problem is that the Coinbase Java Api depends on the Jackson JSON processor, along with several other dependencies that can be found <a href="https://github.com/coinbase/coinbase-java/blob/master/pom.xml" rel="nofollow">here</a>, and I'm assuming that the jar that you download didn't come with all of these dependencies packaged inside it which means that they won't be on your classpath just because you've added the coinbase jar. You could either try to resolve these dependencies manually, which would be incredibly tedious and unnecessary, or you could use a build automation tool. Considering that the Coinbase Java API was built with it in mind I would recommend setting your project up to use <a href="http://maven.apache.org/" rel="nofollow">Maven</a>.</p>

CC BY-SA 3.0
2014-12-01T21:37:24.440Z
2014-12-01T21:37:24.440Z
CJ-Coinsetter
<p>I've simply downloaded an API <code>.jar</code> file of a <code>Coinbase</code>. I've created a project <code>dynamic web project</code>. I added successfully into a reference library that API. </p>

<p>Here is my simple program:</p>

<pre><code>import com.coinbase.api.Coinbase;
import com.coinbase.api.CoinbaseBuilder;

public class Main {
    public static void main(String[] args){

        try {

            Coinbase cb=new CoinbaseBuilder()
            .withApiKey(System.getenv("My API KEY"), System.getenv("MY API SECRET"))
            .build();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
</code></pre>

<p>As i run this program, it says: </p>

<pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/type/TypeReference
    at com.coinbase.api.CoinbaseBuilder.build(CoinbaseBuilder.java:16)
    at Main.main(Main.java:11)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.type.TypeReference
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 2 more
</code></pre>

<p>Do I need to put something here? I'm did checked thrice, My API key is correct!</p>

CC BY-SA 3.0
2014-11-30T15:49:01.320Z
@GeorgeKimionis I disagree. It would probably be better asked on another site, but I don't think it's offtopic.
Nick ODell
CC BY-SA 3.0
2014-12-01T15:23:40.740Z
@GeorgeKimionis However, thanks for finding that link. That could probably be an answer if you quoted one of the answers on that page.
Nick ODell
<bitcoind><coinbase.com><java>
NoClassDefFoundError when using Java Coinbase API
Rajendra arora
# NoClassDefFoundError when using Java Coinbase API

(Asked by: username_0 on 2014-11-30)

I've simply downloaded an API `.jar` file of a `Coinbase`. I've created a project `dynamic web project`. I added successfully into a reference library that API.

Here is my simple program:

```
import com.coinbase.api.Coinbase;
import com.coinbase.api.CoinbaseBuilder;

public class Main {
    public static void main(String[] args){

        try {

            Coinbase cb=new CoinbaseBuilder()
            .withApiKey(System.getenv("My API KEY"), System.getenv("MY API SECRET"))
            .build();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

```

As i run this program, it says:

```
Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/type/TypeReference
    at com.coinbase.api.CoinbaseBuilder.build(CoinbaseBuilder.java:16)
    at Main.main(Main.java:11)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.type.TypeReference
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 2 more

```

Do I need to put something here? I'm did checked thrice, My API key is correct!

**Tags:** bitcoind, coinbase.com, java

> **Comments:**
> **username_1**: @GeorgeKimionis I disagree. It would probably be better asked on another site, but I don't think it's offtopic.  
> **username_1**: @GeorgeKimionis However, thanks for finding that link. That could probably be an answer if you quoted one of the answers on that page.  

---

## 1 answers

### Answer by username_2 on 2014-12-01. Score: 1

Well the problem is that the Coinbase Java Api depends on the Jackson JSON processor, along with several other dependencies that can be found [here](https://github.com/coinbase/coinbase-java/blob/master/pom.xml), and I'm assuming that the jar that you download didn't come with all of these dependencies packaged inside it which means that they won't be on your classpath just because you've added the coinbase jar. You could either try to resolve these dependencies manually, which would be incredibly tedious and unnecessary, or you could use a build automation tool. Considering that the Coinbase Java API was built with it in mind I would recommend setting your project up to use [Maven](http://maven.apache.org/).


---

