Java SDK - cannot resolve dependancy

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)?

afaik, no, but this could be an interesting thing to setup!

Meanwhile, @Rafal, I’ll DM you some credentials used in an app having ~ 25 sensors transmitting every 10 minutes :wink:

@cambierr i still didnt receive your message :frowning: did you sent it?

Thank you very much for your help and sory for being impudence :slight_smile:

Hello,

I have a similar problem. I tried to follow the quick start instructions to install the Java SDK. After creating the Java project I added the given dependency into the created pom.xml and tried to compile everything.
But the build failed due to the following Error:

[ERROR] Failed to execute goal on project mqtt: Could not resolve dependencies for project org.thethingsnetwork.samples.mqtt:mqtt:jar:1.0-SNAPSHOT: Failed to collect dependencies at org.thethingsnetwork:data-mqtt:jar:2.0.0: Failed to read artifact descriptor for org.thethingsnetwork:data-mqtt:jar:2.0.0: Failure to find org.thethingsnetwork:app-sdk:pom:2.0.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

Do you have an idea how to fix this or which step I missed?

I had the same problem as you. There is some problem with 2.0.0 version and now you should use the latest stable version which is 1.0.0.

I was talking with the most active guy which is doing this lib and he told me that he is working on fix those bugs which are make unable to use 2.0.0 vesrsion

Protip try to not mix these two versions because it will not works
Try this version, in my project works correct.

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

Hi Guys!

v2.1 is almost ready, There is only some documentation that should still be completed :slight_smile:

In case you want to contribute: https://github.com/TheThingsNetwork/java-app-sdk

Hi there.

Sorry to post it here. But I thought everyone here is using Java SDK it might have a higher chance to solve this problem.

Just tried to play with Java SDK on TNN. But it failed on first step.

I followed the steps on blow link
https://github.com/TheThingsNetwork/java-app-sdk/blob/master/data/data-mqtt/README.md.

Install the JAVA SDK, Install MVN, Download java-app-sdk.

But when I tried step 4: Build and cache the artifact:

mvn clean package install.

It fails with below error "
[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:
0.5.0:compile (default) on project management: An error occurred while invoking
protoc.: Error while executing process. Cannot run program “C:\xxxx\Java\java-app-sdk-master\management\target\protoc-plugins\protoc-3.0.0-b
eta-3-linux-x86_64.exe”: CreateProcess error=216, This version of %1 is not comp
atible with the version of Windows you’re running. Check your computer’s system
information to see whether you need a x86 (32-bit) or x64 (64-bit) version of th
e program, and then contact the software publisher -> [Help 1]
".

I went to the folder and did find the generated program “\java-app-sdk-master\management\target\protoc-plugins\protoc-3.0.0-b
eta-3-linux-x86_64.exe” but this program can’t be executed because of compatibility problem.

Does anyone have ideas on how to solve this problem?

Thanks.
B.R.
Aaron