[JAVA-2007] bson:checkstyleMain FAILED when ./gradlew check command is run Created: 07/Oct/15 Updated: 07/Dec/15 Resolved: 13/Oct/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Valencia Serrao | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 3 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
RHEL ppc64le, OpenJDK Runtime Environment (rhel-2.6.1.2.ael7b_1-ppc64le u85-b01), OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode), |
||
| Attachments: |
|
| Description |
|
I'm trying to build the mongo-java-driver from github repo : https://github.com/mongodb/mongo-java-driver and followed the build steps from "Build" section on the page. However, after running ./gradlew check i'm getting this errror : ./gradlew check FAILURE: Build failed with an exception.
Execution failed for task ':bson:checkstyleMain'. > Unable to create a Checker: cannot initialize module SuppressionFilter - Cannot set property 'file' in module SuppressionFilter to 'config/checkstyle-exclude.xml': unable to find config/checkstyle-exclude.xml
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Note: the file config/checkstyle-exclude.xml exists at the location On running the with stacktrace option it shows that there is FileNotFoundException (PFA the stacktrace log) Please let me know if any dependency needs to be fixed. |
| Comments |
| Comment by Jeffrey Yemin [ 07/Dec/15 ] | ||
|
The 3.2.0 driver, which contains a fix for this issue, has been released today. | ||
| Comment by Valencia Serrao [ 15/Oct/15 ] | ||
|
@Jeff: Issue resolved. Thank you! | ||
| Comment by Valencia Serrao [ 15/Oct/15 ] | ||
|
Hi Ross, I shifted to the master branch and also upgraded mongodb server to 3.1.10. All tests are now passing on the master branch. I appreciate the dedication you've shown to resolve this JIRA ticket. Thank you! Regards, | ||
| Comment by Ross Lawley [ 13/Oct/15 ] | ||
|
Hi valnci, Just to let you know the gradlew change has been merged into master. I also updated the readme to ensure that users know about the enableTestCommands setting. I was unable to replicate the failing test cases with the latest 3.1.9 pre release. Its possible they were caused by compatibility issues with the older pre release version. Ross | ||
| Comment by Githook User [ 13/Oct/15 ] | ||
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Updated build instructions Fixed exotic bug with checkstyle configuration
| ||
| Comment by Valencia Serrao [ 13/Oct/15 ] | ||
|
Hi Ross Waiting for your updates on the fixes. Thanks for the insight into the "skipped tests". Regards, | ||
| Comment by Ross Lawley [ 13/Oct/15 ] | ||
|
Hi Valencia, I see you are running a development version of MongoDB, this is a likely cause for some of the test errors as support for 3.2 is still in active development. So changes regarding FindOperation have already hit the master branch but may not be in my branch yet. I'll look into those shortly and will update this ticket with any specific findings and fixes. There are various reasons for skipping tests all to do with the topology of the database that they are running. The common cases are testing specific versions of MongoDB, testing specific topologies; replicaSets and sharded clusters and other tests test authentication. As such no single configuration will run all the test cases. The test matrix for the master branch can be seen here: https://jenkins.10gen.com/job/mongo-java-driver-test-3.x/ Ross | ||
| Comment by Valencia Serrao [ 13/Oct/15 ] | ||
|
Hi Jeff, Output of above mentioned commands is as follows: ------------------------------------------------------------------------------------------------------------------------------------------------------ , , --------------------------------------------------------------------------------------------------------------------------------------------------- > db.isMaster() { "ismaster" : true, "maxBsonObjectSize" : 16777216, "maxMessageSizeBytes" : 48000000, "maxWriteBatchSize" : 1000, "localTime" : ISODate("2015-10-13T04:32:25.185Z"), "maxWireVersion" : 4, "minWireVersion" : 0, "ok" : 1 }------------------------------------------------------------------------------------------------------------------------------------------- Regards, | ||
| Comment by Jeffrey Yemin [ 12/Oct/15 ] | ||
|
Hi Valencia, Please run the following two commands in a mongo shell and post the output to this ticket:
| ||
| Comment by Valencia Serrao [ 12/Oct/15 ] | ||
|
Hi Ross, Thank you, indeed the documentation helped a lot. I've been able to proceed further. Most of the failures are now resolved. However, there are 3 failures that still persists as follows: 2. should apply comment 3. should pass miscallaneous flags through PFA screenshot of each of the above failures after ./gradlew check Please guide me on these errors. Also there are some "skipped" tests, can you please tell why they are being skipped ? Regards, | ||
| Comment by Valencia Serrao [ 12/Oct/15 ] | ||
|
Screenshot for error 3 | ||
| Comment by Valencia Serrao [ 12/Oct/15 ] | ||
|
Screenshot for error 2 | ||
| Comment by Valencia Serrao [ 12/Oct/15 ] | ||
|
Screenshot for error 1 | ||
| Comment by Ross Lawley [ 09/Oct/15 ] | ||
|
Hi Valencia, Good news that has fixed the gradle issue. The test failures look to be caused because mongodb doesn't have the test commands enabled, it looks like this has been missed out of the documentation and I'll update. In meantime here is a the enableTestCommands documentation. Ross | ||
| Comment by Valencia Serrao [ 09/Oct/15 ] | ||
|
Hi Ross, Thanks for the fix. Yes, after cloning new copy of the mongo-java-driver and doing a 'git checkout j2007', I'm able to proceed on the ./gradle check command. (with the mongod server up and running) However, it has reported 13 failures. I have attached the console output and the .html file showing the test report. Please let me know if any other dependencies need to resolved. Regards, | ||
| Comment by Valencia Serrao [ 09/Oct/15 ] | ||
|
Error Report generated in .html | ||
| Comment by Valencia Serrao [ 09/Oct/15 ] | ||
|
Output of ./gradlew check | ||
| Comment by Ross Lawley [ 08/Oct/15 ] | ||
|
Hi valnci, Thanks for opening this ticket and chasing the issue up. I haven't been able to replicate it locally on OSX or on our Jenkins machines which I believe are Ubuntu. However, if I change the checkstyle.xml suppression filter rule I can get the same error. My hypothesis is that checkstyle.xml uses relative paths to the process running checkstyle, I'm not sure why that is causing an error for you but I hope I have a fix by setting the absolute path. Can you test the j2007 branch and see if that fixes the issue. Thanks for your patience with this issue, Ross | ||
| Comment by Githook User [ 08/Oct/15 ] | ||
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Gradle: Updated checkstyle configuration
| ||
| Comment by Jeffrey Yemin [ 07/Oct/15 ] | ||
|
The mongodb-dev thread that spawned this issue. |