I am trying to connect mongodb using java but i am getting following exception
Apr 3, 2013 10:55:41 AM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
SEVERE: The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container java.lang.NoClassDefFoundError: com/mongodb/DB
at prime.task.TaskServices.save(TaskServices.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
If u anybody tell me how to solve this problem it will very helpful for me
it seams your IDE is not referring mongodb java driver correctly, please, try to use a different driver version, clear eclipse project, or create the project in a different workspace, or run the project manually on console add -cp command line param.
Regards, Moacy