我在日志中遇到异常,与orientdb(2.2.19)相关
SYS_ERR: java.lang.IllegalStateException: Pool is closed
>
> at
> com.orientechnologies.orient.core.db.OPartitionedDatabasePool.checkForClose(OPartitionedDatabasePool.java:370)
>
> at
> com.orientechnologies.orient.core.db.OPartitionedDatabasePool.acquire(OPartitionedDatabasePool.java:176)
>
> at
> com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.<init>(OrientBaseGraph.java:143)
>
> at
> com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.<init>(OrientTransactionalGraph.java:77)
> at
> com.tinkerpop.blueprints.impls.orient.OrientGraph.<init>(OrientGraph.java:135)
> at
> com.tinkerpop.blueprints.impls.orient.OrientGraphFactory$1.getGraph(OrientGraphFactory.java:84)
>
> at
> com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.getTx(OrientGraphFactory.java:221)
代码主要执行在orientdb中添加数据,在获取OrientGraphFactory.getTx()调用时,我看到所有这些异常。
我正在调用commit()调用,然后执行shutdown()
private void commitGraph(OrientBaseGraph graph){
try{
graph.commit();
}catch(Exception e){
e.printStackTrace();
}finally{
graph.shutdown();
}
}
此外,在执行提交
时,NPE之后会出现这些异常java.lang.NullPointerException
at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.makeActive(OrientBaseGraph.java:362)
at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:177)
OrientGraphFactory初始化如下
factory = new OrientGraphFactory(url, userName, password).setupPool(1,50);
任何指针,抛出此错误的时间和原因都会有所帮助。
修改
我的orientdb-server-config.xml中的配置如下:
<parameters>
<parameter value="true" name="enabled"/>
<parameter value="50" name="graph.pool.max"/>
</parameters>
我可以看到,没有到达具有orientdb安装的远程服务器有很多例外。它与它有关吗?我可以看到以下异常
com.orientechnologies.orient.core.exception.OStorageException: Cannot create a connection to remote server address(es)