I’m attempting to develop an API in Java that uses jetty and RESTEasy to run the API and Morphia to connect to a MongoDB, but when I try to establish a datastore, the program crashes and it shows errors.
An exception was caught and reported.
Message: Unable to support mongodb+srv// style connections as the 'com.sun.jndi.dns.DnsContextFactory' class is not available in this JRE.
Try to update or reinstall MongoDB and check if it works.