fixed race condition with creating ActorCache and changed implementation of Java to fix NullPointer issue when running in clustered mode