cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Error while Creating a Thing from a Virtual Thing Service (Java SDK)

nbhagtani
12-Amethyst

Error while Creating a Thing from a Virtual Thing Service (Java SDK)

Referring to below thread am trying to create thing from java SDK

Creating a Thing from a Virtual Thing Service (Java SDK)

I tried doing same thing creating thing from edge but am getting exception

"Exception in thread "main" java.lang.Exception: No open connections were available on endpoint 0"

Could you please help me out what i am missing?

i have replicated above code no changes at all.

3 REPLIES 3
posipova
20-Turquoise
(To:nbhagtani)

How is your device connected? Are you able to ping the platform from the device?

This might indicate a poor connection. That being the case, consider increasing the timeout.

AnnaAn
14-Alexandrite
(To:nbhagtani)

Hi Nisha Bhagtani​,

I had the same issue when I directly invokeService or Create Things after Client is started without waiting some time.

You could also try if it works for you.

Try to add code:

//add this code rightly after client.start();

//you could consider to increase/decrease the waiting time(30000 ms in my example) per your test result

if (client.waitForConnection(30000)) {

// Create things, invoke services, etc. here

//......

}

Thanks,

Br,

Anna

Also, please share the complete logs for review.

Announcements


Top Tags