{"action":"created","issue":{"url":"https://api.github.com/repos/robertoschwald/grails-audit-logging-plugin/issues/91","labels_url":"https://api.github.com/repos/robertoschwald/grails-audit-logging-plugin/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/robertoschwald/grails-audit-logging-plugin/issues/91/comments","events_url":"https://api.github.com/repos/robertoschwald/grails-audit-logging-plugin/issues/91/events","html_url":"https://github.com/robertoschwald/grails-audit-logging-plugin/issues/91","id":91254896,"number":91,"title":"GPAUDITLOGGING-82 Compile fails with mongoDB plugin","user":{"login":"robertoschwald","id":1519879,"avatar_url":"https://avatars.githubusercontent.com/u/1519879?v=3","gravatar_id":"","url":"https://api.github.com/users/robertoschwald","html_url":"https://github.com/robertoschwald","followers_url":"https://api.github.com/users/robertoschwald/followers","following_url":"https://api.github.com/users/robertoschwald/following{/other_user}","gists_url":"https://api.github.com/users/robertoschwald/gists{/gist_id}","starred_url":"https://api.github.com/users/robertoschwald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertoschwald/subscriptions","organizations_url":"https://api.github.com/users/robertoschwald/orgs","repos_url":"https://api.github.com/users/robertoschwald/repos","events_url":"https://api.github.com/users/robertoschwald/events{/privacy}","received_events_url":"https://api.github.com/users/robertoschwald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-26T13:40:47Z","updated_at":"2015-07-06T16:20:15Z","closed_at":null,"body":"opened by bronoman 07/Jun/15 5:18 PM\r\n\r\nupon adding AuditLogging plugin to my app, I get the following compile error:\r\n\r\n23:07:33 ERROR org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener - Error initializing the application: Cannot get property 'datastores' on null object\r\njava.lang.NullPointerException: Cannot get property 'datastores' on null object\r\nat AuditLoggingGrailsPlugin$_closure1.doCall(AuditLoggingGrailsPlugin.groovy:104)\r\nat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\nat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\nat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\nat java.lang.Thread.run(Thread.java:745)\r\nProcess finished with exit code 1\r\n\r\n\r\nalternative reference: \r\nhttp://stackoverflow.com/questions/23470095/grails-audit-logging-plugin-for-mongodb-is-not-working \r\n(same behavior)"},"comment":{"url":"https://api.github.com/repos/robertoschwald/grails-audit-logging-plugin/issues/comments/118915477","html_url":"https://github.com/robertoschwald/grails-audit-logging-plugin/issues/91#issuecomment-118915477","issue_url":"https://api.github.com/repos/robertoschwald/grails-audit-logging-plugin/issues/91","id":118915477,"user":{"login":"bronoman","id":565604,"avatar_url":"https://avatars.githubusercontent.com/u/565604?v=3","gravatar_id":"","url":"https://api.github.com/users/bronoman","html_url":"https://github.com/bronoman","followers_url":"https://api.github.com/users/bronoman/followers","following_url":"https://api.github.com/users/bronoman/following{/other_user}","gists_url":"https://api.github.com/users/bronoman/gists{/gist_id}","starred_url":"https://api.github.com/users/bronoman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bronoman/subscriptions","organizations_url":"https://api.github.com/users/bronoman/orgs","repos_url":"https://api.github.com/users/bronoman/repos","events_url":"https://api.github.com/users/bronoman/events{/privacy}","received_events_url":"https://api.github.com/users/bronoman/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T16:20:15Z","updated_at":"2015-07-06T16:20:15Z","body":"Hi, \r\nI'm using Grails 2.4.4 with a mixed mode DB setup. \r\nMy AuditLogging plugin is 1.0.5\r\nMy MongoDB plugin version is: 3.0.3. with mongoDB version itself at v. 2.6.10\r\n\r\nThe mongoDB part works flawlessly. However, I cannot get the auditLogging plugin to write anything to my H2 database or mongoDB (however, I'm not sure how to configure the audit-logging plugin correcty to write to mongoDB).\r\n\r\nHere is my DataSource.groovy file:\r\n```groovy\r\n// new mongo config\r\ngrails {\r\n\tmongo {\r\n\t\tdatabaseName = \"noSQL\" // the default database name\r\n\t\thost = \"localhost\"\r\n\t\tport = 27017\r\n\t}\r\n}\r\n\r\n// legacy H2 database, decommission mid-term\r\ndataSource {\r\n\tpooled = true\r\n\tdriverClassName = \"org.h2.Driver\"\r\n\tusername = \"**************\"\r\n\tpassword = \"****************\"\r\n\tconfigClass = HibernateFilterDomainConfiguration\r\n}\r\n\r\nhibernate {\r\n\tcache.use_second_level_cache = true\r\n\tcache.use_query_cache = false\r\n\tcache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory' // Hibernate 3\r\n//    cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory' // Hibernate4\r\n}\r\n\r\n// environment specific settings\r\nenvironments {\r\n\tdevelopment {\r\n\t\tdataSource {\r\n\t\t\t// for Hibernate Filter plugin:\r\n\t\t\tconfigClass = HibernateFilterDomainConfiguration\r\n\t\t\tdbCreate = \"create-drop\" // one of 'create', 'create-drop', 'update', 'validate', ''\r\n\t\t\turl = \"jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE\"\r\n\t\t}\r\n\t}\r\n\ttest {\r\n\t\tdataSource {\r\n\t\t\tdriverClassName = \"com.mysql.jdbc.Driver\"\r\n\t\t\tdialect = \"org.hibernate.dialect.MySQL5InnoDBDialect\"\r\n\t\t\t// for Hibernate Filter plugin:\r\n\t\t\tconfigClass = HibernateFilterDomainConfiguration\r\n\t\t\tusername = \"*********************\"\r\n\t\t\tpassword = \"*********************\"\r\n\t\t\tdbCreate = \"create-drop\" // use \"create\", \"create-drop\",\"update\"\r\n\t\t\turl = \"jdbc:mysql://xxxxxxxxxxxx:xxxxxxx/xxxxxxxxxx?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8\"\r\n\t\t}\r\n\t}\r\n\tproduction {\r\n\t\tdataSource {\r\n\t\t\tdriverClassName = \"com.mysql.jdbc.Driver\"\r\n\t\t\tdialect = \"org.hibernate.dialect.MySQL5InnoDBDialect\"\r\n\t\t\t// for Hibernate Filter plugin:\r\n\t\t\tconfigClass = HibernateFilterDomainConfiguration\r\n\t\t\tdbCreate = \"update\"\r\n\t\t\turl = \"jdbc:mysql://xxxxxxxxxx.jelastic.dogado.eu/xxxxxxxxxxxx?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8\"\r\n\t\t\tusername = \"************\"\r\n\t\t\tpassword = \"****************\"\r\n\t\t\tproperties {\r\n\t\t\t\tmaxActive = 50\r\n\t\t\t\tmaxIdle = 25\r\n\t\t\t\tminIdle = 5\r\n\t\t\t\tinitialSize = 5\r\n\t\t\t\tminEvictableIdleTimeMillis = 60000\r\n\t\t\t\ttimeBetweenEvictionRunsMillis = 60000\r\n\t\t\t\tmaxWait = 10000\r\n\t\t\t\tvalidationQuery = \"/* ping */\"\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n```\r\n\r\n"}}