Hi
I think your dependencies are loaded fine, both approaches work.
I recreated a setup with:
mongo 3.x local,
mongo-java-driver-3.0.4.jar
gmongo-1.5.jar,
setup authentication,
created an admin user etc - I could reproduce your error.
I worked out another syntax, seems to work for me and is neater than the previous example, please give it a shot:
import com.gmongo.GMongo
import com.mongodb.MongoURI
def mongo = new GMongo(new MongoURI("mongodb://myUserAdmin:abc123@localhost/admin"))
log.info mongo.getDatabaseNames() //If not properly authorized, this should cause 'not authorized on admin to execute command...'
Regards,
Rupert