[JAVA-522] Getting Null Pointer Exception in Mongo Java Driver Created: 15/Feb/12 Updated: 18/Jun/12 Resolved: 05/Apr/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API |
| Affects Version/s: | 2.7.3 |
| Fix Version/s: | 2.8.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Steve Owens | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Fedora RHEL5. |
||
| Description |
|
One of our production servers is throwing the following exception stack trace and we would like to elicit help in determining what might be the root cause of the error. The interesting parts of the stakc trace are: ava.lang.NullPointerException Any thoughts on the root cause possibilities? The error is intermitent and not consistent. Full stack trace below: 2012-02-14 17:34:47,719 ERROR org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274) [http-8080-exec-4] - Servlet.service() for servlet spring |
| Comments |
| Comment by Jeffrey Yemin [ 18/Jun/12 ] | ||||||||||||||||||||||||||
|
Closing for 2.8.0 release. | ||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 05/Apr/12 ] | ||||||||||||||||||||||||||
|
I fixed the NPE. For the underlying server error that's being masked by this bug, please follow up on one of the support channels. | ||||||||||||||||||||||||||
| Comment by auto [ 12/Mar/12 ] | ||||||||||||||||||||||||||
|
Author: {u'login': u'jyemin', u'email': u'jeff.yemin@10gen.com', u'name': u'Jeff Yemin'}Message: | ||||||||||||||||||||||||||
| Comment by Steve Owens [ 23/Feb/12 ] | ||||||||||||||||||||||||||
|
Still trying to get server logs showing some kind of errors in conjunction with this issue. I haven't forgotten this issue. | ||||||||||||||||||||||||||
| Comment by Steve Owens [ 15/Feb/12 ] | ||||||||||||||||||||||||||
|
I will try to get them for you tomorrow. | ||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 15/Feb/12 ] | ||||||||||||||||||||||||||
|
Yes, I meant server logs. | ||||||||||||||||||||||||||
| Comment by Steve Owens [ 15/Feb/12 ] | ||||||||||||||||||||||||||
|
Some additional information before I go home for the evening. The environment in which this is occuring is set up with multiple mongo shards with multiple mongo instances in each shards replica set. Given what I was reading in the
Especially when evidenced only in situations of relatively high load. | ||||||||||||||||||||||||||
| Comment by Steve Owens [ 15/Feb/12 ] | ||||||||||||||||||||||||||
|
I presume you are talking about the mongo db server logs and not the server logs of the server where the mongo-java-driver is being used correct? | ||||||||||||||||||||||||||
| Comment by Steve Owens [ 15/Feb/12 ] | ||||||||||||||||||||||||||
|
Will request the server logs but probably won't get them till tomorrow. | ||||||||||||||||||||||||||
| Comment by Steve Owens [ 15/Feb/12 ] | ||||||||||||||||||||||||||
|
I found the following related jira issues: Related articles: | ||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 15/Feb/12 ] | ||||||||||||||||||||||||||
|
Can you check the server logs for any errors? | ||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 15/Feb/12 ] | ||||||||||||||||||||||||||
|
Looks like a bug in DPPort that's generating the NPE, which is masking the server error. The _cmd field is what's null. | ||||||||||||||||||||||||||
| Comment by Steve Owens [ 15/Feb/12 ] | ||||||||||||||||||||||||||
|
Digging further looks like the issue is in CommandResult.java:64 at: either _cmd, or _cmd.keySet() or _cmd.keySet().iterator() is null. Is this an issue that has been fixed in a subsequent release of mongo-java-driver?
| ||||||||||||||||||||||||||
| Comment by Steve Owens [ 15/Feb/12 ] | ||||||||||||||||||||||||||
|
I checked the source and the lines relevant to the null pointer specifically line 308 are as follows. What might cause such a null pointer to occur?
| ||||||||||||||||||||||||||
| Comment by Steve Owens [ 15/Feb/12 ] | ||||||||||||||||||||||||||
|
Sepcific version of mongo-java-driver is mongo-java-driver-2.6.5.jar as pulled in by maven the git-hash for the jar file is: a123456f244cd3770f2c6ab78380e6f81fc272f6 |