I always get the error “The current batch process and the configured remote server do not share the same DB configuration.” when trying to execute the sonarAnalyze task.
Has anybody else this problem or ideas? I am using Gradle 1.3 and Sonar 3.3.2…
Sounds like you haven’t configured ‘sonar.database’ in the build script, or haven’t configured it correctly. Note that Sonar 3.3 changed the default database settings, so Gradle’s defaults won’t work for that version.
In my build script I specify the DB URL (it is equal to the Sonar DB URL), the username and password for the connection. Imo, I should have configured the database connection equal - does it make a difference which MySQL Connector version is used? (If so, which one is used by Gradle?)
The Sonar client uses the DB information specified in the Gradle build script. The Sonar server uses the DB information configured in the Sonar server.
If you think that you have configured ‘sonar.database’ correctly, and still get this error, I recommend to take this to the Sonar mailing list.
My Gradle config is: http://pastebin.com/jey1uN3b and the used DB URL in Sonar itself is “jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true”
In fact, I don’t see any difference but maybe I’ve overseen anything…
hello, your db url specifies localhost as sonar db server. I think thats the problem, as the localhost is obviously different on the machine(s) where you execute your buld script and on the sonar server.