在commit - orientdb的baasbox代码中获取NullPointerException

时间:2014-10-21 04:13:19

标签: orientdb baasbox

当我启动baasbox时,我在提交时收到NullPointerException。我在baasbox的DbHelper.java文件中注释掉了事务逻辑。

orientdb版本是1.6.3。之前在这个版本中出现过这个问题吗?

有人对此有所了解吗?

以下是例外:

java.lang.NullPointerException: null
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic$2.run(OTransactionOptimistic.java:145) ~[orientdb-core-1.6.3.jar:1.6.3]
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.commit(OLocalPaginatedStorage.java:1446) ~[orientdb-core-1.6.3.jar:1.6.3]
Wrapped by: com.orientechnologies.orient.core.exception.OStorageException: Error during transaction commit.
    at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.commit(OLocalPaginatedStorage.java:1460) ~[orientdb-core-1.6.3.jar:1.6.3]
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:176) ~[orientdb-core-1.6.3.jar:1.6.3]
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit(ODatabaseRecordTx.java:115) ~[orientdb-core-1.6.3.jar:1.6.3]
    at com.baasbox.db.DbHelper.commitTransaction(DbHelper.java:119) ~[classes/:na]
    at com.baasbox.service.user.UserService.signUp(UserService.java:283) ~[classes/:na]
    at com.baasbox.service.user.UserService.createDefaultUsers(UserService.java:74) ~[classes/:na]

1 个答案:

答案 0 :(得分:0)

该语句已被评论,因为OrientDB 1.6.3对于事务和图形数据库有一些限制(对于一些BaasBox用例)。 OrientDB 1.7.x已经消失了这些限制。 结果是BaasBox 0.8.4现在完全支持必要的事务,并且DbHelper类的源代码确实已经更新。

请参阅https://github.com/baasbox/baasbox/blob/0.8.4/app/com/baasbox/db/DbHelper.java#L130