samples icon indicating copy to clipboard operation
samples copied to clipboard

This sample do not appear to work against TB 1.4.0, self-hosted or live demo

Open aderusha opened this issue 7 years ago • 3 comments

Attempting to run this against demo.thingsboard.io or a fresh local install of TB 1.4.0 both yield the same results: dashboards are created, but rules and devices aren't. This has been tested under Windows 10 and Ubuntu 16.04 w/ Java 8.

Test command: java -jar facilities-monitoring.jar demo.thingsboard.io

Error output (example, it repeats the Rules and Device errors several times, presumably one for each rule and device): Unable to upload rule! Cause: org.springframework.web.client.HttpClientErrorException: 400 null at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91) at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:667) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:620) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:580) at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:380) at org.thingsboard.demo.loader.data.DemoData.lambda$uploadData$9(DemoData.java:380) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.thingsboard.demo.loader.data.DemoData.uploadData(DemoData.java:366) at org.thingsboard.demo.loader.DemoLoader.loadDemoFromClasspath(DemoLoader.java:77) at org.thingsboard.samples.facility.FacilitiesDemoMain.main(FacilitiesDemoMain.java:64) Unable to upload device! Cause: org.springframework.web.client.HttpClientErrorException: 400 null at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91) at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:667) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:620) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:580) at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:380) at org.thingsboard.demo.loader.data.DemoData.lambda$uploadData$12(DemoData.java:451) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.thingsboard.demo.loader.data.DemoData.uploadData(DemoData.java:420) at org.thingsboard.demo.loader.DemoLoader.loadDemoFromClasspath(DemoLoader.java:77) at org.thingsboard.samples.facility.FacilitiesDemoMain.main(FacilitiesDemoMain.java:64)

aderusha avatar Mar 22 '18 21:03 aderusha

yes please, I have the same issue, any solution here?!

elgayyar avatar Apr 05 '18 14:04 elgayyar

I'm curious about whether it should work with version 2 server, maybe not. Is there anything like it for current version?

EDIT: well, i just went thru the current getting started guide, which has hands on examples etc, which served my purpose quite ok .. https://thingsboard.io/docs/getting-started-guides/helloworld/

antont avatar Aug 15 '18 09:08 antont

Hello All,

the compiled version that are available online reference ver 1.0.0 of things board so try to load

org.thingsboard.server.common.data.plugin.PluginMetaData org.thingsboard.server.common.data.rule.RuleMetaData

that are no more present in the new version.

this is the new library

image

MirkoUgoliniDev avatar Oct 05 '19 16:10 MirkoUgoliniDev