Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3122

java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.9.1
    • Component/s: BSON
    • None
    • Environment:
      JDK 11

      The error happens when doing query:

      java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
      at org.bson.json.JsonWriter.doWriteBinaryData(JsonWriter.java:155)
      at org.bson.AbstractBsonWriter.writeBinaryData(AbstractBsonWriter.java:351)
      at org.bson.codecs.BsonBinaryCodec.encode(BsonBinaryCodec.java:31)
      at org.bson.codecs.BsonBinaryCodec.encode(BsonBinaryCodec.java:28)
      at org.bson.codecs.EncoderContext.encodeWithChildContext(EncoderContext.java:91)
      at org.bson.codecs.BsonDocumentCodec.writeValue(BsonDocumentCodec.java:133)
      at org.bson.codecs.BsonDocumentCodec.encode(BsonDocumentCodec.java:112)
      at org.bson.codecs.BsonDocumentCodec.encode(BsonDocumentCodec.java:40)
      at org.bson.codecs.configuration.LazyCodec.encode(LazyCodec.java:37)
      at org.bson.codecs.EncoderContext.encodeWithChildContext(EncoderContext.java:91)
      at org.bson.codecs.BsonDocumentCodec.writeValue(BsonDocumentCodec.java:133)
      at org.bson.codecs.BsonDocumentCodec.encode(BsonDocumentCodec.java:112)
      at org.bson.codecs.BsonDocumentCodec.encode(BsonDocumentCodec.java:40)
      at org.bson.codecs.EncoderContext.encodeWithChildContext(EncoderContext.java:91)
      at org.bson.codecs.BsonDocumentCodec.writeValue(BsonDocumentCodec.java:133)
      at org.bson.codecs.BsonDocumentCodec.encode(BsonDocumentCodec.java:112)
      at com.mongodb.MongoCommandException.getResponseAsJson(MongoCommandException.java:83)
      at com.mongodb.MongoCommandException.<init>(MongoCommandException.java:49)
      at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:77)
      at com.mongodb.connection.CommandProtocol.createCommandResult(CommandProtocol.java:140)
      at com.mongodb.connection.CommandProtocol.receiveMessage(CommandProtocol.java:131)
      at com.mongodb.connection.CommandProtocol.execute(CommandProtocol.java:84)
      at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:155)
      at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:219)
      at com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:146)
      at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:182)
      at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:173)
      at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:128)
      at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:118)
      at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:69)
      at com.mongodb.operation.CountOperation.execute(CountOperation.java:172)
      at com.mongodb.operation.CountOperation.execute(CountOperation.java:43)
      at com.mongodb.Mongo.execute(Mongo.java:738)
      at com.mongodb.Mongo$2.execute(Mongo.java:725)
      at com.mongodb.DBCollection.getCount(DBCollection.java:919)
      at com.mongodb.DBCollection.getCount(DBCollection.java:896)
      at com.mongodb.DBCollection.getCount(DBCollection.java:891)
      at com.mongodb.DBCollection.getCount(DBCollection.java:874)
      at com.mongodb.DBCollection.getCount(DBCollection.java:845)
      at com.mongodb.DBCollection.count(DBCollection.java:772)
      at mongodb.conn.MongoExecutor.numberToSample(MongoExecutor.java:530)
      at mongodb.conn.MongoExecutor.getSchema(MongoExecutor.java:485)
      at mongodb.conn.ServerConnection.buildSourceDatabase(ServerConnection.java:1805)
      at mongodb.conn.ServerConnection.buildSchema(ServerConnection.java:1702)
      at mongodb.conn.ServerConnection.connect(ServerConnection.java:714)
      at mongodb.jdbc.MongoConnection.<init>(MongoConnection.java:92)
      at mongodb.jdbc.MongoDriver.connect(MongoDriver.java:278)
      at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
      at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:189)
      at quadbase.common.util.internal.ConnectionPool.allocateConnection(ConnectionPool.java:193)
      at quadbase.common.util.internal.ConnectionPool.getConnection(ConnectionPool.java:149)
      at quadbase.common.util.internal.QbConnection.init(QbConnection.java:128)
      at quadbase.common.util.internal.QbConnection.init(QbConnection.java:107)
      at quadbase.common.util.internal.QbConnection.<init>(QbConnection.java:76)
      at quadbase.common.util.internal.DBInfoBasic.openConnection(DBInfoBasic.java:434)
      at quadbase.common.server.SQLSlave.getResultSet(SQLSlave.java:116)
      at quadbase.common.server.SQLSlave.readData(SQLSlave.java:131)
      at quadbase.common.server.DataSlave.run(DataSlave.java:88)
      at quadbase.common.server.MessageThread.processMessage(MessageThread.java:1601)
      at quadbase.common.server.Server.processMessage(Server.java:1090)
      at ESMMessageServlet.doPost(ESMMessageServlet.java:22)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at CharsetFilter.doFilter(CharsetFilter.java:29)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.base/java.lang.Thread.run(Thread.java:834)

            Assignee:
            Unassigned Unassigned
            Reporter:
            rachelyu Rachel Yu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: