尝试访问实时查询的侦听器中的记录时出错

时间:2015-12-20 09:38:27

标签: orientdb

我按照live query文档

中的描述创建了监听器

当我使用orient studio在课堂上进行一些操作时,我得到一个回调,但当我尝试访问记录时,我得到的错误

com.orientechnologies.orient.core.exception.ODatabaseException: Database instance is not set in current thread. Assure to set it with: ODatabaseRecordThreadLocal.INSTANCE.set(db);
at com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal.get(ODatabaseRecordThreadLocal.java:51)
at com.orientechnologies.orient.core.record.ORecordAbstract.getDatabase(ORecordAbstract.java:240)
at com.orientechnologies.orient.core.record.impl.ODocument.getGlobalPropertyById(ODocument.java:2155)
at com.orientechnologies.orient.core.record.impl.ODocumentInternal.getGlobalPropertyById(ODocumentInternal.java:60)

我正在将数据库实例设置为ODatabaseRecordThreadLocal.instance.set(db)

0 个答案:

没有答案