MongoDB SourceConnector Sync

I am trying to create MongoDb source connector with the official connector but getting an error.

<html>
<head>
<meta http-equiv="Content-Type" content="text/
html;charset=utf-8"/>
<title>Error 500 Request failed.</titl
e>
</head>
<body><h2>HTTP ERROR 500 Request failed.</h2>
<ta
ble>
<tr><th>URI:</th><td>/connectors</td></tr>
<tr><th>STAT
US:</th><td>500</td></tr>
<tr><th>MESSAGE:</th><td>Request f
ailed.</td></tr>
<tr><th>SERVLET:</th><td>org.glassfish.jers
ey.servlet.ServletContainer-137a4b54</td></tr>
</table>
<hr>
<a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.
33.v20201020</a><hr/>

</body>
</html>

connector code

CREATE SOURCE CONNECTOR mongodb_migrations WITH (
  'connector.class' = 'com.mongodb.kafka.connect.MongoSourceConnector',
  'connection.uri' = '${env:mongoURL}',
  'startup.mode' = 'copy_existing',
  'copy.existing' = 'true',
  'copy.existing.namespace.regex' = '.*\\..*',
  'topic.prefix' = 'json',
  'pipeline' = '[{"$match": {"ns.db": {"$regex": "^db.*"}}}]',
  'output.format.key' = 'json',
  'output.format.value' = 'json',
  'output.schema.infer.value' = 'true',
  'topic.creation.enable' = 'true',
  'topic.creation.default.replication.factor' = '1',
  'topic.creation.default.partitions' = '12',
  'key.converter' = 'org.apache.kafka.connect.json.JsonConverter',
  'value.converter' = 'org.apache.kafka.connect.json.JsonConverter',
  'key.converter.schemas.enable' = 'false',
  'value.converter.schemas.enable' = 'false',
  'poll.await.time.ms' = '1000'
);

Please help understand the issue.