[JAVA-3122] java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter Created: 13/Dec/18 Updated: 11/Sep/19 Resolved: 13/Dec/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | BSON |
| Affects Version/s: | 3.9.1 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Rachel Yu | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
JDK 11 |
||
| Issue Links: |
|
||||||||
| Description |
|
The error happens when doing query: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter |
| Comments |
| Comment by Jeffrey Yemin [ 13/Dec/18 ] |
|
This is odd. In the 3.9.1 source tree the only reference I find to DatatypeConverter is in the org.bson.json.DateTimeFormatter clas. It's used reflectively, and only on JVM versions < 8. Source code: https://github.com/mongodb/mongo-java-driver/blob/r3.9.1/bson/src/main/org/bson/json/DateTimeFormatter.java rachelyu can you double check that you're using the 3.9.1 driver? If you look here you'll see that the line number of org.bson.json.JsonWriter#doWriteBinaryData doesn't match that of the stack trace you provided in the description. I suspect you have a much older version of the driver in your classpath: 3.4 or earlier, in fact. You shouldn't have this problem with a more recent version of the driver. Related issue: |