#153 Cache is not initialized

Justin Tashker Tue 25 Feb 2014

I'm having trouble opening any haystack slots, I cannot rebuild cache or open the haystack service.

This is on a JACE 6 running 3.7.106, I tried nHaystack version 1.1.2, 1.1.1 and 1.0.4 but none will work.

Here is the error I get:

javax.baja.sys.ActionInvokeException

at com.tridium.fox.sys.broker.BFoxComponentSpace$FoxTrapCallbacks.invoke(BFoxComponentSpace.java:366)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1540)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1525)
at javax.baja.sys.BComponent.invoke(BComponent.java:1107)
at nhaystack.ui.BSiteRefFE.<init>(BSiteRefFE.java:53)
at nhaystack.ui.Row.makeRefFE(Row.java:241)
at nhaystack.ui.Row.makeValueFE(Row.java:176)
at nhaystack.ui.Row.<init>(Row.java:42)
at nhaystack.ui.BHDictEditor.loadMainGrid(BHDictEditor.java:143)
at nhaystack.ui.BHDictEditor.<init>(BHDictEditor.java:127)
at nhaystack.ui.BHDictEditorGroup.<init>(BHDictEditorGroup.java:113)
at nhaystack.ui.BHDictFE.edit(BHDictFE.java:97)
at nhaystack.ui.BHDictFE.access$1(BHDictFE.java:30)
at nhaystack.ui.BHDictFE$Popup.doInvoke(BHDictFE.java:92)
at javax.baja.ui.Command.doInvoke(Command.java:313)
at javax.baja.ui.Command.invoke(Command.java:283)
at javax.baja.ui.BButton.doInvokeAction(BButton.java:149)
at javax.baja.ui.BAbstractButton.mouseReleased(BAbstractButton.java:556)
at javax.baja.ui.BWidget.fireMouseEvent(BWidget.java:1201)
com.tridium.fox.session.ServerException: java.lang.IllegalStateException: Cache is not initialized.
   at com.tridium.fox.sys.LocalizableExceptionTranslator.messageToException(LocalizableExceptionTranslator.java:95)
   at com.tridium.fox.session.FoxSession.sendSync(FoxSession.java:565)
   at com.tridium.fox.sys.BFoxConnection.sendSync(BFoxConnection.java:499)
   at com.tridium.fox.sys.BFoxChannel.sendSync(BFoxChannel.java:134)
   at com.tridium.fox.sys.broker.BBrokerChannel.invoke(BBrokerChannel.java:1530)
   at com.tridium.fox.sys.broker.BFoxComponentSpace$FoxTrapCallbacks.invoke(BFoxComponentSpace.java:361)
   at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1540)
   at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java:1525)
   at javax.baja.sys.BComponent.invoke(BComponent.java:1107)
   at nhaystack.ui.BSiteRefFE.<init>(BSiteRefFE.java:53)
   at nhaystack.ui.Row.makeRefFE(Row.java:241)
   at nhaystack.ui.Row.makeValueFE(Row.java:176)
   at nhaystack.ui.Row.<init>(Row.java:42)
   at nhaystack.ui.BHDictEditor.loadMainGrid(BHDictEditor.java:143)
   at nhaystack.ui.BHDictEditor.<init>(BHDictEditor.java:127)
   at nhaystack.ui.BHDictEditorGroup.<init>(BHDictEditorGroup.java:113)
   at nhaystack.ui.BHDictFE.edit(BHDictFE.java:97)
   at nhaystack.ui.BHDictFE.access$1(BHDictFE.java:30)
   at nhaystack.ui.BHDictFE$Popup.doInvoke(BHDictFE.java:92)

Is there anything I can do to get this working again? Everything was already tagged in 1.0.4 and when we upgraded to 1.1.2, this issue came up.

Mike Jarmy Wed 26 Feb 2014

It looks like the NHaystack internal cache has not yet finished initializing. This could be because it just takes a really long time on that station, or there could be a problem with the dataset, or a bug.

When you start the station, wait until you see the message in the log output saying that the cache has initialized. If it never comes up, contact me via email and I will help you straighten it out.

Christopher Howard Tue 10 Jun 2014

I just started getting this error and I can't seem to get around it. Using the latest posted version.

Mike Jarmy Tue 10 Jun 2014

are you using AX 3.8?

Christopher Howard Wed 11 Jun 2014

yes 3.8.38

Mike Jarmy Wed 11 Jun 2014

There does appear to be some kind of problem with nhaystack and 3.8.38 that we just found a couple of days ago. We are working on resolving it ASAP

Christopher Howard Wed 11 Jun 2014

Thanks, Mike. Keep up the good work.

Christopher Howard Thu 12 Jun 2014

Just a shot in the dark, but would this change in 3.8 have any issue with nhaystack?

https://community.niagara-central.com/ord?portal:/discussion/DiscussionThread/17984

Christopher Howard Thu 12 Jun 2014

Perhaps affecting BNHaystackServiceView.java

Mike Jarmy Fri 13 Jun 2014

No, that's where Tridium just move some code around.

I think I've got it fixed

Reginald Carr Fri 13 Nov 2015

Hi, first time poster.

What was the solution to this error? I ask because I'm getting the same error when I try to initialize Haystack on my JACE (Tridium 3.7.106.8). However, I am able to build the cache. I'm running Haystack 1.2.5.

Here's the error if you need it:

{code} MESSAGE [16:51:03 13-Nov-15 CST][nhaystack] Begin cache rebuild. MESSAGE [16:51:04 13-Nov-15 CST][nhaystack] End cache rebuild 1132ms. ComponentSlotMap.getFlags: null

instance.type  nhaystack:NHaystackService

ERROR [16:51:17 13-Nov-15 CST][fox.broker] Cannot invoke action: h:88b9 initializeHaystack java.lang.NullPointerException

at com.tridium.sys.schema.ComponentSlotMap.getFlags(ComponentSlotMap.java)
at javax.baja.sys.BComplex.getFlags(BComplex.java)
at javax.baja.sys.Flags.isOperator(Flags.java)
at javax.baja.user.BUser.checkInvoke(BUser.java)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java)
at com.tridium.sys.schema.ComponentSlotMap.invoke(ComponentSlotMap.java)
at javax.baja.sys.BComponent.invoke(BComponent.java)
at com.tridium.fox.sys.broker.BBrokerChannel.invoke(BBrokerChannel.java)
at com.tridium.fox.sys.broker.BBrokerChannel.process(BBrokerChannel.java)
at com.tridium.fox.sys.BFoxConnection.process(BFoxConnection.java)
at com.tridium.fox.session.SessionDispatcher.dispatch(SessionDispatcher.java)
at com.tridium.fox.session.SessionDispatcher.run(SessionDispatcher.java)
at java.lang.Thread.run(Unknown Source)

Lawrence A Tue 4 Dec

Hello,

I know this is a very old post about Cache Not Initializing.

  • N4.2 supervisor
  • nHaystack 2.1.0

Will any errors during the initializing in haystack server on the supervisor station stop the module from completing its initializing?

Thanks.

Jerry Weatherhogg Wed 5 Dec

Lawrence, if have the Platform's Application Direction open when you initialize nHaystack, you'll see its progress and any errors during nHaystack startup.

Lawrence A Thu 6 Dec

Hi Jerry,

Thanks for the response.

I have the Application Director open and I can see that any id mismatches/errors during the initialization of the nHaystack server halts the process on the first error it hits.

Is there a way to force the haystack server to complete the initialization process? Other than fixing the errors as we go?

Login or Signup to reply.