Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Regarding mongoDB javascript functionality in kundera #212

sbheda opened this Issue · 4 comments

3 participants


How can i call MongoDB javascript file in kundera ?


2.4 release doesn't provide a handle for raw mongodb instance. It's in our roadmap and 2.5 release will enable this feature. Will post an update on this once it's checked-in current trunk branch.



Here is how I access to the MongoDB driver from Kundera:
Map clients = null;
MongoDBClient client = null;
clients = (Map) em.getDelegate();
if (clients != null) client = (MongoDBClient) clients.get(persistenceUnitName);
if (client != null) {
try {
Field db = client.getClass().getDeclaredField("mongoDb");
if (!db.isAccessible()) {
mongoDB = (DB) db.get(client);
} catch(Exception e) {
log.error("Cannot access MongoDB driver. Cause : '{}'",e.getMessage());
throw new ExceptionTechnique(e);

Hope this helps


Please refer:

for proper fix on this.


@mevivs mevivs closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.