Java SDK - cannot resolve dependancy

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
I’m just going through this tutorial. Does anybody have idea what i’m doing wrong?

Thanks,
Rafal

Also, if i try to do this tutorial, 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?

Well, this issue as been reported (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.

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

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

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 :slight_smile:

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

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?

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

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

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 :slight_smile:

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

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 :stuck_out_tongue:)

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

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

haha :smiley:

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

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

1 Like

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?

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

Thank you very much,

Oh, thats right, that was bad mix :smiley: 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)?