Hierarchies export NullPointerException


#1

I have some trouble with the Haystack+ driver.

The system is Niagara 4.8 on a windows server 2019 standard.

Driver is setup, but will not export points in the haystack server. I have tried different hierarchies and tuning on/off export settings with same result.
Can you see the problem?

1

Application Director output when trigger:

SEVERE [11:55:34 13-May-20 CEST][sys.engine] Link propogate: Indirect: slot:executionTime.fireTrigger -> slot:/Drivers/HaystackDriver/HaystackNetwork/localDevice/Exports/HierarchyExport.export

java.lang.NullPointerException

at com.kodaro.haystack.export.BHaystackHierarchyExport.doExport(BHaystackHierarchyExport.java:497)

at auto.com_kodaro_haystack_export_BHaystackHierarchyExport.invoke(AutoGenerated)

at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1891)

at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1856)

at javax.baja.sys.BComponent.invoke(BComponent.java:1230)

at javax.baja.sys.BLink.propagateActionToAction(BLink.java:605)

at javax.baja.sys.BLink.propagate(BLink.java:507)

at com.tridium.sys.engine.SlotKnobs.propagate(SlotKnobs.java:61)

at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1914)

at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1856)

at javax.baja.sys.BComponent.invoke(BComponent.java:1221)

at com.tridium.fox.sys.broker.BBrokerChannel.invoke(BBrokerChannel.java:1877)

at com.tridium.fox.sys.broker.BBrokerChannel.process(BBrokerChannel.java:245)

at com.tridium.fox.sys.BFoxConnection.process(BFoxConnection.java:452)

at com.tridium.fox.session.SessionDispatcher.dispatch(SessionDispatcher.java:84)

at com.tridium.fox.session.SessionDispatcher.run(SessionDispatcher.java:63)

at java.lang.Thread.run(Thread.java:748)

Best Regards
Dennis


#2

Looks like the issue is happening with the trigger automatically invoking the export. Does this issue still show up if you manually invoke the export action directly?


#3

Hi Jonathan

Yes the same error is observed when a manuel invoke action is used.
Any suggestions?


#4

Did you manually execute on the trigger or the export object? If you executed on the export object, what’s the new error?


#5

Hi Jonathan

Application Director output when invoke on HierarchtExport:
SEVERE [20:06:42 18-May-20 CEST][fox.broker] Cannot invoke action: h:3453 export
java.lang.NullPointerException
at com.kodaro.haystack.export.BHaystackHierarchyExport.doExport(BHaystackHierarchyExport.java:497)
at auto.com_kodaro_haystack_export_BHaystackHierarchyExport.invoke(AutoGenerated)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1891)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1856)
at javax.baja.sys.BComponent.invoke(BComponent.java:1221)
at com.tridium.fox.sys.broker.BBrokerChannel.invoke(BBrokerChannel.java:1877)
at com.tridium.fox.sys.broker.BBrokerChannel.process(BBrokerChannel.java:245)
at com.tridium.fox.sys.BFoxConnection.process(BFoxConnection.java:452)
at com.tridium.fox.session.SessionDispatcher.dispatch(SessionDispatcher.java:84)
at com.tridium.fox.session.SessionDispatcher.run(SessionDispatcher.java:63)
at java.lang.Thread.run(Thread.java:748)

java.lang.NullPointerException
at com.kodaro.haystack.export.BHaystackHierarchyExport.doExport(BHaystackHierarchyExport.java:497)
at auto.com_kodaro_haystack_export_BHaystackHierarchyExport.invoke(AutoGenerated)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1891)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1856)
at javax.baja.sys.BComponent.invoke(BComponent.java:1221)
at com.tridium.fox.sys.broker.BBrokerChannel.invoke(BBrokerChannel.java:1877)
at com.tridium.fox.sys.broker.BBrokerChannel.process(BBrokerChannel.java:245)
at com.tridium.fox.sys.BFoxConnection.process(BFoxConnection.java:452)
at com.tridium.fox.session.SessionDispatcher.dispatch(SessionDispatcher.java:84)
at com.tridium.fox.session.SessionDispatcher.run(SessionDispatcher.java:63)
at java.lang.Thread.run(Thread.java:748)

Application Director output when invoke on Execution Time:
SEVERE [20:09:09 18-May-20 CEST][sys.engine] Link propogate: Indirect: slot:executionTime.fireTrigger -> slot:/Drivers/HaystackDriver/Exports/HierarchyExport.export
java.lang.NullPointerException
at com.kodaro.haystack.export.BHaystackHierarchyExport.doExport(BHaystackHierarchyExport.java:497)
at auto.com_kodaro_haystack_export_BHaystackHierarchyExport.invoke(AutoGenerated)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1891)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1856)
at javax.baja.sys.BComponent.invoke(BComponent.java:1230)
at javax.baja.sys.BLink.propagateActionToAction(BLink.java:605)
at javax.baja.sys.BLink.propagate(BLink.java:507)
at com.tridium.sys.engine.SlotKnobs.propagate(SlotKnobs.java:61)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1914)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1856)
at javax.baja.sys.BComponent.invoke(BComponent.java:1221)
at com.tridium.fox.sys.broker.BBrokerChannel.invoke(BBrokerChannel.java:1877)
at com.tridium.fox.sys.broker.BBrokerChannel.process(BBrokerChannel.java:245)
at com.tridium.fox.sys.BFoxConnection.process(BFoxConnection.java:452)
at com.tridium.fox.session.SessionDispatcher.dispatch(SessionDispatcher.java:84)
at com.tridium.fox.session.SessionDispatcher.run(SessionDispatcher.java:63)
at java.lang.Thread.run(Thread.java:748)


#6

Hi Jonathan

I still havn´t cracked this one. Do you have any suggestions for further Trouble Shoot?

Best Regards
Dennis


#7

I would suggest deleting that export and adding a new one. It looks like the object has become corrupted in the station some how.


#8

Hi Jonathan

The export has now deleted and new added with succes. I get this output when a manuel fire trigger is invoked.
Steps performed:

  • New Hierechy
  • New export

Any further suggestions?

SEVERE [14:11:23 03-Jun-20 CEST][sys.engine] Link propogate: Indirect: slot:executionTime.fireTrigger -> slot:/Drivers/HaystackDriver/HaystackNetwork/localDevice/Exports/HierarchyExport.export
java.lang.NullPointerException
at com.kodaro.haystack.export.BHaystackHierarchyExport.doExport(BHaystackHierarchyExport.java:634)
at auto.com_kodaro_haystack_export_BHaystackHierarchyExport.invoke(AutoGenerated)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1891)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1856)
at javax.baja.sys.BComponent.invoke(BComponent.java:1230)
at javax.baja.sys.BLink.propagateActionToAction(BLink.java:605)
at javax.baja.sys.BLink.propagate(BLink.java:507)
at com.tridium.sys.engine.SlotKnobs.propagate(SlotKnobs.java:61)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1914)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1856)
at javax.baja.sys.BComponent.invoke(BComponent.java:1221)
at com.tridium.fox.sys.broker.BBrokerChannel.invoke(BBrokerChannel.java:1877)
at com.tridium.fox.sys.broker.BBrokerChannel.process(BBrokerChannel.java:245)
at com.tridium.fox.sys.BFoxConnection.process(BFoxConnection.java:452)
at com.tridium.fox.session.SessionDispatcher.dispatch(SessionDispatcher.java:84)
at com.tridium.fox.session.SessionDispatcher.run(SessionDispatcher.java:63)
at java.lang.Thread.run(Thread.java:748)


#9

I noticed something weird about this latest stack trace and then started to review all the information from the beginning and noticed something I missed from your screen shot earlier, you have no device connection. You cannot drop exports directly under the network object, you have to create a device connection first and then configure the exports under that device.


#10

Hi Joathan

Ok, so the N4 need a connection to SkySpark to push the data via the Kodaro driver?

Can you please confirm my N4 configuration is correct now?

image
image

The application director give me this for now:
FINER [14:42:51 11-Jun-20 CEST][kodarohaystack.SkySparkDemo] THROW
org.projecthaystack.auth.AuthException: authenticate failed
at org.projecthaystack.auth.AuthClientContext.open(AuthClientContext.java:96)
at org.projecthaystack.client.HClient.open(HClient.java:128)
at com.kodaro.haystack.core.HKodaroClient.open(HKodaroClient.java:113)
at com.kodaro.haystack.BHaystackDevice.getClient(BHaystackDevice.java:960)
at com.kodaro.haystack.BHaystackDevice.conectOrPing(BHaystackDevice.java:986)
at com.kodaro.haystack.BHaystackDevice.performConnect(BHaystackDevice.java:754)
at com.kodaro.haystack.message.DeviceConnectMessage.execute(DeviceConnectMessage.java:34)
at com.kodaro.haystack.message.DeviceConnectMessage.run(DeviceConnectMessage.java:28)
at javax.baja.util.ThreadPoolWorker$WorkerThread.run(ThreadPoolWorker.java:290)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.http.HttpClient.(HttpClient.java:242)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:357)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984)
at org.projecthaystack.auth.AuthClientContext.get(AuthClientContext.java:251)
at org.projecthaystack.auth.AuthClientContext.getAuth(AuthClientContext.java:222)
at org.projecthaystack.auth.AuthClientContext.sendHello(AuthClientContext.java:111)
at org.projecthaystack.auth.AuthClientContext.open(AuthClientContext.java:70)
… 8 more

When I try to connect to the Skyspark Haystack server from a local webserver i get this:
image

So i need to find out why I SkySpark is not available. Am i on the right track?


#11

It appears you are being rejected on the connection from skyspark due to auth failures, so I would confirm that. As far as skyspark not being available, you appear to have an ip in the driver and localhost in the web test. Is skyspark running locally on the machine you did the web test or is it at the ip identified in the driver? I think you’re on the right track though, just need to confirm the credentials you have in the driver at this point and it should all start working.


#12

Hi Jonathan

Jubii, got the connection to work. It was a simple cridential issue.

The next issue is when i do a fire trigger for export. This is the result in application director:

FINE [22:20:52 18-Jun-20 CEST][kodarohaystack.kodarohaystack:HaystackHierarchyExport] Executing Export: local:|station:|slot:/Drivers/HaystackDriver/HaystackNetwork/SkySparkDemo/exports/Exports/HierarchyExport
FINE [22:20:52 18-Jun-20 CEST][kodarohaystack.kodarohaystack:HaystackHierarchyExport] Resolving Hierarchy: local:|station:|slot:/Drivers/HaystackDriver/HaystackNetwork/SkySparkDemo/exports/Exports/HierarchyExport
FINE [22:20:52 18-Jun-20 CEST][kodarohaystack.kodarohaystack:HaystackHierarchyExport] Hierachy Resolved: local:|station:|slot:/Drivers/HaystackDriver/HaystackNetwork/SkySparkDemo/exports/Exports/HierarchyExport
java.lang.ClassCastException: javax.baja.util.BUnrestrictedFolder cannot be cast to com.kodaro.haystack.export.BHaystackExports
at com.kodaro.haystack.export.BHaystackExport.getExports(BHaystackExport.java:564)
at com.kodaro.haystack.export.BHaystackHierarchyExport.enqueue(BHaystackHierarchyExport.java:1498)
at com.kodaro.haystack.export.BHaystackHierarchyExport.performExport(BHaystackHierarchyExport.java:725)
at com.kodaro.haystack.message.HierarchyExportMessage.execute(HierarchyExportMessage.java:36)
at com.kodaro.haystack.message.HierarchyExportMessage.run(HierarchyExportMessage.java:28)
at javax.baja.util.ThreadPoolWorker$WorkerThread.run(ThreadPoolWorker.java:290)
java.lang.ClassCastException: javax.baja.util.BUnrestrictedFolder cannot be cast to com.kodaro.haystack.export.BHaystackExports
at com.kodaro.haystack.export.BHaystackExport.getExports(BHaystackExport.java:564)
at com.kodaro.haystack.export.BHaystackHierarchyExport.enqueue(BHaystackHierarchyExport.java:1498)
at com.kodaro.haystack.export.BHaystackHierarchyExport.performExport(BHaystackHierarchyExport.java:725)
at com.kodaro.haystack.message.HierarchyExportMessage.execute(HierarchyExportMessage.java:36)
at com.kodaro.haystack.message.HierarchyExportMessage.run(HierarchyExportMessage.java:28)
at javax.baja.util.ThreadPoolWorker$WorkerThread.run(ThreadPoolWorker.java:290)
FINE [22:20:52 18-Jun-20 CEST][kodarohaystack.kodarohaystack:HaystackHierarchyExport] Export Execution ended: local:|station:|slot:/Drivers/HaystackDriver/HaystackNetwork/SkySparkDemo/exports/Exports/HierarchyExport

SkySpark is 3.0.23

Any advice?


#13

Can you confirm that the Ord to the hierarchy is actually to the hiearchy and not a folder? Screen shots would help diagnosing what it’s actually pointing to and that it does exist in the hierarchy service.


#14

Hi Jonathan

Here is a screenshot:

image


#15

Can you expand the hierarchy and show how it’s configured? For a reference to what a valid one should look like, see the following post.


#16

Hi Jonathan

Here is the hierarchy setup. I have tried with different hierarchy with same result.

image


#17

Move the exports directly under the exports object on the device object. Do not use a folder.