Skip to main content
5-Regular Member
February 26, 2018
Solved

Help for Azure IoT Hub Connector Demo Issue

  • February 26, 2018
  • 1 reply
  • 7028 views

Hello everyone,

I'm try to practice the Azure IoT Hub Connector, I follow the guide at http://support.ptc.com/help/thingworx_hc/thingworx_cx_services/#page/thingworx_cx_services%2Fazure_connector%2Fc_azure_connector_hc_top_level_page.html%23 , the connector service is work as well.

but when I try the next step to launch the "Edge Device Demo", I got error as below. can anyone help me to identify the problem?

C:\Thingworx-Azure-IoT-Hub-Connector-2.0.0.141\demo\edge-device-demo\bin>edge-de
vice-demo.bat
09:56:28.252 [main] DEBUG c.t.p.a.i.d.AzureIotEdgeDeviceDemo - Started at:151961
0188252
09:56:30.094 [main] DEBUG c.t.p.a.i.d.AzureIotEdgeDeviceDemo - Device already ex
ists, returning it: id=azuredevice952
09:56:30.094 [main] INFO c.t.p.a.i.d.AzureIotEdgeDeviceDemo - Edge device: id=a
zuredevice952, primaryKey=KuouH1edP/CERlVGNY/PMQ==, secondaryKey=DhAS9P15S0CcbhG
+ClVVqA==, eTag=Nzg1NTQzOTE2
log4j:WARN No appenders could be found for logger (com.microsoft.azure.sdk.iot.d
evice.IotHubConnectionString).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more in
fo.
Exception in thread "main" groovy.lang.MissingMethodException: No signature of m
ethod: java.lang.Long.call() is applicable for argument types: (java.lang.Long)
values: [2]
Possible solutions: wait(long), wait(), any(), abs(), abs(), wait(long, int)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptByteco
deAdapter.java:58)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaC
lassSite.java:49)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSi
teArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:125)
at com.thingworx.protocol.azure.iot.demo.AzureIotEdgeDeviceDemo$_main_cl
osure2.doCall(AzureIotEdgeDeviceDemo.groovy:122)
at com.thingworx.protocol.azure.iot.demo.AzureIotEdgeDeviceDemo$_main_cl
osure2.doCall(AzureIotEdgeDeviceDemo.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(C
losureMetaClass.java:294)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
at groovy.lang.Closure.call(Closure.java:426)
at groovy.lang.Closure.call(Closure.java:420)
at groovy.json.JsonDelegate.cloneDelegateAndGetContent(JsonDelegate.java
:78)
at groovy.json.JsonBuilder.call(JsonBuilder.java:208)
at groovy.json.JsonBuilder$call.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSi
teArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:125)
at com.thingworx.protocol.azure.iot.demo.AzureIotEdgeDeviceDemo.main(Azu
reIotEdgeDeviceDemo.groovy:116)

Best answer by ShengLiangQiu

Seems a bug of the Groovy JsonBuilder of Azure IoT Connector 2.0, I have recompiled the code and please unzip attachment and copy the jar file to replace the same one under demo\edge-device-demo\lib, everything is OK.

1 reply

5-Regular Member
February 27, 2018

Hi, David.

 

Can you tell me just a bit more about your setup; like what version of ThingWorx and what DB you are using? I'm going to follow the same procedure and see if I can reproduce the error.

 

Thanks!

 

-- Craig A.

DavidShen5-Regular MemberAuthor
5-Regular Member
February 28, 2018

Hi Craig,

 

Tanks for your respond,

The environment is ThingWrox 8.1 with H2 DB on windows7.

 

Thanks!

David

5-Regular Member
February 28, 2018

Okay, it will take me a bit to set up a test system, but then I'll walk through the documented process and see if I get the same error.

 

-- Craig A.