Generate java/groovy in addition of js for mongo