com.mongodb.MongoException$CursorNotFound: cursor not found on server异常处理
来源:互联网 发布:阳江市网络问政平台 编辑:程序博客网 时间:2024/06/06 20:02
java链接MongoDB处理大量数据时经常碰到cursor not found 的异常,其实是超时所致
Exception in thread "main" com.mongodb.MongoException$CursorNotFound: cursor not found on server
at com.mongodb.DBApiLayer$Result.init(DBApiLayer.java:379)
at com.mongodb.DBApiLayer$Result._advance(DBApiLayer.java:426)
at com.mongodb.DBApiLayer$Result.hasNext(DBApiLayer.java:408)
at com.mongodb.DBCursor._hasNext(DBCursor.java:495)
at com.mongodb.DBCursor.hasNext(DBCursor.java:515)
DBCursor cursor = collection.find(condtion);
cursor.addOption(com.mongodb.Bytes.QUERYOPTION_NOTIMEOUT);
只要在查询的DBCursor添加com.mongodb.Bytes.QUERYOPTION_NOTIMEOUT就解决!
2 0
- com.mongodb.MongoException$CursorNotFound: cursor not found on server异常处理
- java链接MongoDB:com.mongodb.MongoException$CursorNotFound: cursor 0 not found on server /127.0.0.1:270
- 解决com.mongodb.MongoException$CursorNotFound: cursor 0 not found on server
- 关于MongoException$CursorNotFound的异常处理
- 异常com.mongodb.MongoException: not talking to master and retries used up 处理办法
- pymongo.errors.CursorNotFound: Cursor not found, cursor id: 124891571478
- mongo抛出异常:com.mongodb.MongoException: Lock not granted. Try restarting the transaction 解决方式
- mongodb的CursorNotFound异常
- session not found 异常处理
- Property 'Name' not found on type com.cn.vo.UserInfo
- 异常:javax.el.PropertyNotFoundException: Property 'id' not found on ..........
- 异常:javax.el.PropertyNotFoundException: Property 'id' not found on ..........
- 异常:javax.el.PropertyNotFoundException: Property 'id' not found on
- com.mongodb.MongoException: Runner error: Overflow sort stage buffered data 错误分析
- The requested resource was not found on this server
- The requested resource was not found on this server
- The requested URL /**** was not found on this server
- The requested URL was not found on the server
- JAVA集群分布式和网络设计的浅析(转载!)
- srm 535
- NFV是下一代MBB网络演进的关键技术
- android 实践基础 AndroidUI性能优化-2015/06/11
- MessageBox、::MessageBox 、AfxMessageBox三者的区别
- com.mongodb.MongoException$CursorNotFound: cursor not found on server异常处理
- HTML5新特性展示利用history.replaceState()修改历史记录
- 黑马程序员——基础篇——接口和多态
- 唯购:开通微信商城,费用全免!
- swift学习记录02-控制语句:分支、循环、跳转
- 单例模式
- MFC ActiveX GUID
- js 图片转换为指定大小的DataUrl
- 使用HttpSessionListener接口监听Session的创建和失效