0

Orientdb throws on each live query subscripion using binary protocoll following Nullpointer exception:

Error executing live query subscriber. java.lang.NullPointerException at com.orientechnologies.orient.server.network.protocol.binary.OLiveCommandResultListener.onLiveResult(OLiveCommandResultListener.java:113) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect$2.call(OCommandExecutorSQLLiveSelect.java:134) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect.execInSeparateDatabase(OCommandExecutorSQLLiveSelect.java:144) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLLiveSelect.onLiveResult(OCommandExecutorSQLLiveSelect.java:131) at com.orientechnologies.orient.core.query.live.OLiveQueryQueueThread.run(OLiveQueryQueueThread.java:69)

The Live Query is subscribed by one client: "live select from Account where CheckInDateTime like "2018-02-25%"", Orientdb returns also the live request token ID gracefully. But when another client updates Account with "update Account set CheckInDateTime = "2018-02-25 13:00:00"" the mentioned NullPointerexception is thrown. I've tried to use versions 2.2.30 and 2.2.32 Comunity, DB Administrator and Server Administrator accounts. Also loading of plugins seems not to work (even the used version is 2.2.30 and 2.2.32 where Live Query should be enabled at server by default). Nothing seems to help to get that work, also queries like "live select from account" (without where ...).

Any further ideas? Thx.

Elvis
  • 1
  • 1

2 Answers2

0

Currently live queries do not support the WHERE clause you included in the query.

You can only select entire collections or V and E (which is what I use to get all updates)

If you would like to filter using that where, you will have to write it yourself in code.

mitchken
  • 790
  • 9
  • 26
  • Are you sure about live queries not supporting "WHERE" clauses? This example seems to show otherwise: https://orientdb.com/docs/2.2.x/OrientJS-Query-Live-Query.html#running-events-on-insert – Venryx Feb 02 '21 at 17:35
  • 1
    This might work now, yet it used to not work. Feel free to write a new answer if this issue was resolved. I am not following newer OrientDB updates actively. – mitchken Feb 04 '21 at 12:48
0

Thx for answering mitchken! Fortunately, I found the mistake. The TCP connection from client to DB was in wrong state (must be all the time in waitforreadyread).

Elvis
  • 1
  • 1