Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.0
    • Fix Version/s: 0.5.0
    • Labels:
    • Environment:

      Ubuntu 11.10; gradle version - 1.0-milestone-3, installed via 'apt-get install gradle'

      Description

      gradle test fails with a NullPointerException while executing the non-existent tests under s4-base

        Activity

        Hide
        Matthieu Morel added a comment -

        attaching the full log leading to the NPE, as previously provided by Karthik in the s4-dev mailing list

        Show
        Matthieu Morel added a comment - attaching the full log leading to the NPE, as previously provided by Karthik in the s4-dev mailing list
        Hide
        Karthik Kambatla (Inactive) added a comment -

        I also tried running gradle test from within subprojects/s4-comm. Interestingly, it fails reporting the same error, but only after running all the tests. I doubt if it has to do with permissions to write the report.

        kkambatl@keka:~/code/s4-piper/subprojects/s4-comm$ gradle clean test
        :s4-comm:clean
        :s4-base:compileJava UP-TO-DATE
        :s4-base:processResources UP-TO-DATE
        :s4-base:classes UP-TO-DATE
        :s4-base:jar
        :s4-comm:compileJava
        :s4-comm:processResources
        :s4-comm:classes
        :s4-comm:compileTestJava
        :s4-comm:processTestResources
        :s4-comm:testClasses
        :s4-comm:test

        FAILURE: Build failed with an exception.

        • What went wrong:
          Execution failed for task ':s4-comm:test'.
          Cause: Could not generate test report to '/home/kkambatl/code/s4-piper/subprojects/s4-comm/build/reports/tests'.
          Cause: java.lang.NullPointerException (no error message)
        • Try:
          Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

        BUILD FAILED

        Show
        Karthik Kambatla (Inactive) added a comment - I also tried running gradle test from within subprojects/s4-comm. Interestingly, it fails reporting the same error, but only after running all the tests. I doubt if it has to do with permissions to write the report. kkambatl@keka:~/code/s4-piper/subprojects/s4-comm$ gradle clean test :s4-comm:clean :s4-base:compileJava UP-TO-DATE :s4-base:processResources UP-TO-DATE :s4-base:classes UP-TO-DATE :s4-base:jar :s4-comm:compileJava :s4-comm:processResources :s4-comm:classes :s4-comm:compileTestJava :s4-comm:processTestResources :s4-comm:testClasses :s4-comm:test FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':s4-comm:test'. Cause: Could not generate test report to '/home/kkambatl/code/s4-piper/subprojects/s4-comm/build/reports/tests'. Cause: java.lang.NullPointerException (no error message) Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED
        Hide
        Matthieu Morel added a comment -

        Can you add the corresponding log in debug + stracktrace mode?
        That will help track down the issue.

        Show
        Matthieu Morel added a comment - Can you add the corresponding log in debug + stracktrace mode? That will help track down the issue.
        Hide
        Matthieu Morel added a comment -

        I was able to reproduce the issue on ubuntu when installing gradle through apt. Even after looking at gradle's source, the cause of the issue is still unclear to me. But it might be related to something in the apt apt package itself.

        Indeed, here is a solution that worked for me: instead of installing gradle through apt, install it by downloading from the gradle website, and changing paths accordingly. (you should event remove the apt package with "apt-get remove gradle")

        Please try this out and tell us if that works for you as well!

        Show
        Matthieu Morel added a comment - I was able to reproduce the issue on ubuntu when installing gradle through apt. Even after looking at gradle's source, the cause of the issue is still unclear to me. But it might be related to something in the apt apt package itself. Indeed, here is a solution that worked for me: instead of installing gradle through apt, install it by downloading from the gradle website, and changing paths accordingly. (you should event remove the apt package with "apt-get remove gradle") Please try this out and tell us if that works for you as well!
        Hide
        Matthieu Morel added a comment -

        Leo's suggestion (from the dev mailing list):

        there is a new version of gradle (milestone-5) but may not be in the
        unix packages yet. You can also try gradlew which doesn't require
        having gradle install. SImply use 'gradlew test'. I just added gradlew
        to the repo.

        Show
        Matthieu Morel added a comment - Leo's suggestion (from the dev mailing list): there is a new version of gradle (milestone-5) but may not be in the unix packages yet. You can also try gradlew which doesn't require having gradle install. SImply use 'gradlew test'. I just added gradlew to the repo.
        Hide
        Karthik Kambatla (Inactive) added a comment -

        Fixed - Solution: Don't install gradle by 'apt-get install gradle'

        As suggested by Leo and Matthieu, I have installed gradle on the Ubuntu machine by downloading http://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-5-all.zip. Now, the gradle test works fine.

        Thanks.

        Show
        Karthik Kambatla (Inactive) added a comment - Fixed - Solution: Don't install gradle by 'apt-get install gradle' As suggested by Leo and Matthieu, I have installed gradle on the Ubuntu machine by downloading http://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-5-all.zip . Now, the gradle test works fine. Thanks.
        Hide
        Karthik Kambatla (Inactive) added a comment -

        Fixed - Solution: Don't install gradle by 'apt-get install gradle'

        As suggested by Leo and Matthieu, I have installed gradle on the Ubuntu machine by downloading http://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-5-all.zip. Now, the gradle test works fine.

        Thanks.

        Show
        Karthik Kambatla (Inactive) added a comment - Fixed - Solution: Don't install gradle by 'apt-get install gradle' As suggested by Leo and Matthieu, I have installed gradle on the Ubuntu machine by downloading http://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-5-all.zip . Now, the gradle test works fine. Thanks.

          People

          • Assignee:
            Unassigned
            Reporter:
            Karthik Kambatla
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development