# Java SDK - cannot resolve dependancy

**URL:** <https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513>\
**Category:** v2 Backend\
**Created:** [December 21, 2016, 3:48pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513 "2016-12-21T15:48:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 21, 2016, 3:48pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/1 "2016-12-21T15:48:11Z")

</div>

Hello,

i’m trying to build my Java application which will be able to connect with TTN and pull the data from gateway through TTN. When i setup my java project i’m unable to download maven dependancy.  
[https://www.thethingsnetwork.org/docs/applications/java/quick-start.html](https://www.thethingsnetwork.org/docs/applications/java/quick-start.html)  
I’m just going through this tutorial. Does anybody have idea what i’m doing wrong?

Thanks,  
Rafal

---

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 21, 2016, 4:05pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/2 "2016-12-21T16:05:22Z")

</div>

Also, if i try to do this tutorial, [https://github.com/TheThingsNetwork/java-app-sdk/tree/master/data/mqtt](https://github.com/TheThingsNetwork/java-app-sdk/tree/master/data/mqtt) i cannot do mvn clean package install,  
the problem is that:

Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile (default) on project management: protoc did not exit cleanly. Review output for more information.

Does anybody have the same problem?

---

<div class="post-metadata">

**Author:** ![cambierr](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cambierr/32/3078_2.png) [@cambierr](https://www.thethingsnetwork.org/forum/u/cambierr)\
**Post date:** [December 21, 2016, 6:18pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/3 "2016-12-21T18:18:12Z")

</div>

Well, this issue as been reported ([https://github.com/TheThingsNetwork/java-app-sdk/issues/40](https://github.com/TheThingsNetwork/java-app-sdk/issues/40)).

It’s due to the fact that we did a quick partial release to follow TTNv2 launch.

It’s fixed in v2.1.0 but I still need to do some testing before the final realease.

I’ll update this post as soon as the 2.1.0 version will be available!

Sorry for the inconvenience.

---

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 21, 2016, 6:47pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/4 "2016-12-21T18:47:46Z")

</div>

Ok, but i’m just wondering if there is possible, to use previous version until you make the new version release?

What is the last fully ok working vesrion?

Thanks

---

<div class="post-metadata">

**Author:** ![cambierr](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cambierr/32/3078_2.png) [@cambierr](https://www.thethingsnetwork.org/forum/u/cambierr)\
**Post date:** [December 21, 2016, 6:50pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/5 "2016-12-21T18:50:01Z")

</div>

previous version ([http://search.maven.org/#artifactdetails|org.thethingsnetwork|java-app-lib|1.0.0|bundle](http://search.maven.org/#artifactdetails%7Corg.thethingsnetwork%7Cjava-app-lib%7C1.0.0%7Cbundle)) should still work! It just lacks new features but it’s fine for standard uplink & downlink via mqtt

---

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 21, 2016, 6:55pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/6 "2016-12-21T18:55:48Z")

</div>

Oh, thank u very much!!! I will check it out, if you will need any help with contributing this java sdk maybe i will be able to help 🙂

---

<div class="post-metadata">

**Author:** ![cambierr](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cambierr/32/3078_2.png) [@cambierr](https://www.thethingsnetwork.org/forum/u/cambierr)\
**Post date:** [December 21, 2016, 7:03pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/7 "2016-12-21T19:03:26Z")

</div>

All unassigned issues ([https://github.com/TheThingsNetwork/java-app-sdk/issues](https://github.com/TheThingsNetwork/java-app-sdk/issues)) are waiting for somebody to take care of them 😉

---

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 21, 2016, 7:06pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/8 "2016-12-21T19:06:13Z")

</div>

Actually i have still the same problem, my IDE - intelij idea cannot resolve this dependancy. I’m still getting the error that dependancy is not found. Is there any thing that i have change in my IDE settings, i mean for example add some magical maven repsitory which is nescessary to use this dependancy?

---

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 21, 2016, 7:14pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/9 "2016-12-21T19:14:08Z")

</div>

Or maybe there is some REST api which i will be able to use, to recive data from my TTN application?

---

<div class="post-metadata">

**Author:** ![cambierr](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cambierr/32/3078_2.png) [@cambierr](https://www.thethingsnetwork.org/forum/u/cambierr)\
**Post date:** [December 21, 2016, 7:17pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/10 "2016-12-21T19:17:06Z")

</div>

v1 was working fine and it was used by quite a few people.  
Can you make sure you used this:

```
<dependency>
<groupId>org.thethingsnetwork</groupId>
<artifactId>java-app-lib</artifactId>
<version>1.0.0</version>
</dependency>

```

If you’re still having errors, ping me on slack

---

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 21, 2016, 7:17pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/11 "2016-12-21T19:17:32Z")

</div>

There is interesting thing, when i run intelij idea on mac there was a problem with resolving dependancy but when i try on windows it works fine 🙂

---

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 21, 2016, 7:18pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/12 "2016-12-21T19:18:44Z")

</div>

Probably the solution is that on mac i have the newer version of intelij idea then on windows 🙂

---

<div class="post-metadata">

**Author:** ![cambierr](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cambierr/32/3078_2.png) [@cambierr](https://www.thethingsnetwork.org/forum/u/cambierr)\
**Post date:** [December 21, 2016, 7:20pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/13 "2016-12-21T19:20:13Z")

</div>

Interesting. If you manage to have more information about why it’s not working on your mac, please share it… This could probably help others (I don’t have a mac, nor windows 😛)

---

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 21, 2016, 7:30pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/14 "2016-12-21T19:30:04Z")

</div>

So you say that you are using the best OS called linux? 😃

---

<div class="post-metadata">

**Author:** ![cambierr](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cambierr/32/3078_2.png) [@cambierr](https://www.thethingsnetwork.org/forum/u/cambierr)\
**Post date:** [December 21, 2016, 7:33pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/15 "2016-12-21T19:33:15Z")

</div>

Last time I saw a post like that was followed by a linux-hater/linux-lover war 😃

---

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 21, 2016, 7:37pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/16 "2016-12-21T19:37:37Z")

</div>

haha 😃

Btw. do you have any documentation for this 1.0.0 version?

---

<div class="post-metadata">

**Author:** ![cambierr](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cambierr/32/3078_2.png) [@cambierr](https://www.thethingsnetwork.org/forum/u/cambierr)\
**Post date:** [December 21, 2016, 7:42pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/17 "2016-12-21T19:42:13Z")

</div>

API is very close. Here is a link to the quick start of the v1.x branch: [https://github.com/TheThingsNetwork/docs/tree/2d4bc74521f711b2e7ebc7577000abcd303c0fa0/\_includes/v2-preview/java](https://github.com/TheThingsNetwork/docs/tree/2d4bc74521f711b2e7ebc7577000abcd303c0fa0/_includes/v2-preview/java)

---

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 30, 2016, 10:17am UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/18 "2016-12-30T10:17:58Z")

</div>

Cambierr,

i’m trying to do the quick start as is written in given tutorial but i have problem.  
Do you have any idea what is wrong?  
 ![](https://www.thethingsnetwork.org/forum/uploads/default/original/2X/9/95280bf42403ab6eecd4a95e80d3ce19e0698f92.png)

---

<div class="post-metadata">

**Author:** ![cambierr](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cambierr/32/3078_2.png) [@cambierr](https://www.thethingsnetwork.org/forum/u/cambierr)\
**Post date:** [December 30, 2016, 1:06pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/19 "2016-12-30T13:06:49Z")

</div>

Well, this seems to be due to the fact that you use a mix of v2 and v1!  
in v1, you should not use a ConnectHandler as done in v2: you should use a Consumer, as suggested by your IDE.

Check the provided sample at [https://github.com/TheThingsNetwork/java-app-sdk/tree/230d9df5c3a9491f8f2fa8703e3bcbfef7ac8810/sample](https://github.com/TheThingsNetwork/java-app-sdk/tree/230d9df5c3a9491f8f2fa8703e3bcbfef7ac8810/sample)

---

<div class="post-metadata">

**Author:** ![PoliSensors](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/polisensors/32/3326_2.png) [@PoliSensors](https://www.thethingsnetwork.org/forum/u/PoliSensors)\
**Post date:** [December 30, 2016, 3:43pm UTC](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513/20 "2016-12-30T15:43:23Z")

</div>

Thank you very much,

Oh, thats right, that was bad mix 😃 Do you know anything about some hello-world application ttn, to test sdk options?

I mean, is there any open application to test (which is reciving some frames from nodes etc)?

[Next page](https://www.thethingsnetwork.org/forum/t/java-sdk-cannot-resolve-dependancy/4513.md?page=2)
