[JAVA-2741] Getting class not found exception Created: 22/Jan/18  Updated: 26/Sep/22  Resolved: 22/Jan/18

Status: Closed
Project: Java Driver
Component/s: Connection Management
Affects Version/s: 3.6.2
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: RAHUL KARANJAVKJAR [X] Assignee: Unassigned
Resolution: Done Votes: 0
Labels: mongoclient
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Test



 Description   

Exception in thread "main" java.lang.NoClassDefFoundError: com/mongodb/MongoClient
at com.mongodb.example.mongoexample.Mogoconnection.main(Mogoconnection.java:20)
Caused by: java.lang.ClassNotFoundException: com.mongodb.MongoClient
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more



 Comments   
Comment by RAHUL karanjavkar [ 22/Jan/18 ]

Hi Ross,

Appreciate your quick response. I added Java-Driver jar and its working
fine.

Actually i was not able to find required jar versions for stabled MongoDB
version in documentation.

I want to work with document upload and download using mogoDB, if you can
provide documentation for Mongo-v 6.3.1 then it will very useful for me.
Thanks!

Thanks
Rahul Karanjavkar

Comment by Ross Lawley [ 22/Jan/18 ]

Hi Rahulmongo,

It looks like you are missing the driver jar file from your class path, so it is failing. Please check that first! See the installation documentation for more information.

Just to let you know this project is for Java driver bugs or feature requests. The best place for questions regarding MongoDB usage or the Java driver specifics is the mongodb-user mailinglist or stackoverflow as you will reach a boarder audience there. If your business requires an answer from MongoDB within a time frame then we do offer production support.

If you do follow up via one of the options above please post a link and I will follow the conversation there.

All the best,

Ross

Generated at Thu Feb 08 08:57:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.