# Gradle compileJava NPE (does not hang)

**URL:** <https://discuss.gradle.org/t/gradle-compilejava-npe-does-not-hang/9076>\
**Category:** Bugs\
**Created:** [April 15, 2015, 6:42am UTC](https://discuss.gradle.org/t/gradle-compilejava-npe-does-not-hang/9076 "2015-04-15T06:42:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bernat\_Gabor](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/bernat_gabor/32/1538_2.png) [@Bernat\_Gabor](https://discuss.gradle.org/u/Bernat_Gabor)\
**Post date:** [April 15, 2015, 6:42am UTC](https://discuss.gradle.org/t/gradle-compilejava-npe-does-not-hang/9076/1 "2015-04-15T06:42:08Z")

</div>

Hello,

At the moment I do not have a stack trace, but it occured at least twice in the last two weeks with Gradle 2.3 for colleges in our project, with using the daemon. The sympythom is as follows: change some dependencies, and the build. On rare occasions it throws a NUllPointerException (catched this both on Windows and Ubuntu), the stacktrace points to some internal Gradle modul. It just says that the compileJava task failed because of NullPointerException.

A clean, followed by a build does solve this. Once it comes back, I’ll provide a stack trace, but is there some known bug why this happens? More importantly why there is no real error message? 😄

I’ll update this post with the stacktrace if the problem comes back.

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [April 16, 2015, 12:22am UTC](https://discuss.gradle.org/t/gradle-compilejava-npe-does-not-hang/9076/2 "2015-04-16T00:22:00Z")

</div>

> but is there some known bug why this happens? More importantly why there is no real error message

Impossible to answer without the stack trace really.
