# hail.java.FatalError: NoSuchMethodError: breeze.linalg.DenseVector$.canSetD()Lbreeze/generic/UFunc$InPlaceImpl2

**URL:** <https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166>\
**Category:** Help \[0.1\]\
**Created:** [March 21, 2017, 1:42pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166 "2017-03-21T13:42:57Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmitchell](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@rmitchell](https://discuss.hail.is/u/rmitchell)\
**Post date:** [March 21, 2017, 1:42pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/1 "2017-03-21T13:42:57Z")

</div>

Hello,

Sorry for all the questions lately. I’m trying to run logistic regression and I’m getting the following error:

… vds\_gwas = (vds\_gAD\_sCR\_sGQ\_vGQ  
… .filter\_variants\_expr(‘[va.qc.AF](http://va.qc.AF) \> 0.01 && [va.qc.AF](http://va.qc.AF) \< 0.99’)  
… .annotate\_samples\_vds(vds\_pca, code=‘sa.pca = vds.pca’)  
… .logreg(test=‘wald’, y=‘sa.pheno.CCStatus’,  
… covariates=[‘sa.pca.PC1’, ‘sa.pca.PC2’, ‘sa.pca.PC3’, ‘sa.pca.PC4’, ‘sa.pca.PC5’, ‘sa.pca.PC6’, ‘sa.pca.PC7’, ‘sa.pca.PC8’, ‘sa.pca.PC9’, ‘sa.pca.PC10’, ‘sa.pheno.age’, ‘sa.pheno.sex’]))  
hail: info: Running wald logreg on 982 samples with 13 covariates including intercept…  
Traceback (most recent call last):  
File “”, line 6, in   
File “”, line 2, in logreg  
File “/work-zfs/darking1/software/src/hail/python/hail/java.py”, line 107, in handle\_py4j  
raise FatalError(msg)  
hail.java.FatalError: NoSuchMethodError: breeze.linalg.DenseVector$.canSetD()Lbreeze/generic/UFunc$InPlaceImpl2;

I saw there was another post (#1419) but I couldn’t find a fix that worked for me in that post. Any suggestions?

Thanks!

Rebecca

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [March 21, 2017, 1:43pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/2 "2017-03-21T13:43:54Z")

</div>

Just to confirm background info, this is on Google Cloud, right?

---

<div class="post-metadata">

**Author:** ![rmitchell](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@rmitchell](https://discuss.hail.is/u/rmitchell)\
**Post date:** [March 21, 2017, 1:45pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/3 "2017-03-21T13:45:08Z")

</div>

No. This is on an HPC cluster.

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [March 21, 2017, 1:47pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/4 "2017-03-21T13:47:56Z")

</div>

Ah, alright – same set up as Nate had when he got the same error. It looks like we never actually found the problem in #1419, it just started working on its own by recompiling. Could you try that and report back? Sorry it’s broken!

---

<div class="post-metadata">

**Author:** ![rmitchell](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@rmitchell](https://discuss.hail.is/u/rmitchell)\
**Post date:** [March 21, 2017, 1:51pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/5 "2017-03-21T13:51:06Z")

</div>

And by recompiling you mean reinstalling the software? Sorry, new to all of this.

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [March 21, 2017, 3:09pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/6 "2017-03-21T15:09:01Z")

</div>

Yeah, try pulling the latest master and running `gradle clean shadowJar`

---

<div class="post-metadata">

**Author:** ![rmitchell](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@rmitchell](https://discuss.hail.is/u/rmitchell)\
**Post date:** [March 21, 2017, 3:48pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/7 "2017-03-21T15:48:54Z")

</div>

Still getting the same error.

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [March 21, 2017, 4:03pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/8 "2017-03-21T16:03:31Z")

</div>

OK, we’ll look into it. I’ll flag down Dan and Jon (who started addressing it last time) when they’re free.

---

<div class="post-metadata">

**Author:** ![rmitchell](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@rmitchell](https://discuss.hail.is/u/rmitchell)\
**Post date:** [March 21, 2017, 4:13pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/9 "2017-03-21T16:13:11Z")

</div>

Ok great. So I did run:

./gradlew test -Dspark.version=2.1.0

2 of the tests failed:

Gradle suite \> Gradle test \> is.hail.io.LoadBgenSuite.testBgenImportRandom FAILED  
java.io.IOException at LoadBgenSuite.scala:137  
Caused by: java.io.IOException at LoadBgenSuite.scala:137

Gradle suite \> Gradle test \> is.hail.stats.LogisticRegressionModelSuite.covariatesVsInterceptOnlyR FAILED  
java.io.FileNotFoundException at LogisticRegressionModelSuite.scala:155  
Running test: Test method covariatesVsInterceptOnlyTest(is.hail.stats.LogisticRegressionModelSuite)

---

<div class="post-metadata">

**Author:** ![jbloom](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/jbloom/32/109_2.png) [@jbloom](https://discuss.hail.is/u/jbloom)\
**Post date:** [March 26, 2017, 11:02pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/10 "2017-03-26T23:02:14Z")

</div>

Those two tests are failing because you don’t have the R and Plink test dependencies installed and on your path. See Running the Tests at bottom of [Getting Started](https://hail.is/hail/getting_started.html).

Do you get your original error if you increase the Java stack size as described [here](http://discuss.hail.is/t/fixing-logreg-lmmreg-error-when-using-many-sample-covariates-on-dataproc/157?source_topic_id=169)?

Do you get your original error using Spark 2.02?

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [March 27, 2017, 2:19pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/11 "2017-03-27T14:19:44Z")

</div>

Following on with Jon’s commentary, we can more effectively debug if we have specific information about your system:

- What operating system do the nodes of the HPC cluster run? If you can get on a node this command will give us the info we need:

```bash
uname -a

```

- From the machine where you submit or invoke hail, can you post the output of:

```bash
echo $SPARK_HOME
echo $HAIL_HOME
echo $PYTHONPATH

```

- Can you post the exact command you used to compile Hail? The minimal command for Spark 2.0.2 is listed below. I’m particularly interested in whether you specified `-Dspark.version` and to what it was set.

```bash
./gradlew shadowJar

```

Sorry again that you’re having so much trouble. Hopefully we can pin down exactly what Hail is tripping on and clean that up for you and for others in the future!

---

<div class="post-metadata">

**Author:** ![rmitchell](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@rmitchell](https://discuss.hail.is/u/rmitchell)\
**Post date:** [March 27, 2017, 2:29pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/12 "2017-03-27T14:29:42Z")

</div>

So I’ve been using Spark 2.1.0, but I’m in the process of installing Spark 2.0.2 to see if I get the same error using that version.

uname -a  
Linux login-node03 2.6.32-573.22.1.el6.x86\_64 #1 SMP Wed Mar 23 03:35:39 UTC 2016 x86\_64 x86\_64 x86\_64 GNU/Linux  
echo $SPARK\_HOME  
/work-zfs/darking1/software/src/spark-2.1.0-bin-hadoop2.7  
echo $HAIL\_HOME  
/work-zfs/darking1/software/src/hail  
echo $PYTHONPATH  
/work-zfs/darking1/software/src/spark-2.1.0-bin-hadoop2.7/python:/work-zfs/darking1/software/src/spark-2.1.0-bin-hadoop2.7/python/lib/py4j-0.10.4-src.zip:/work-zfs/darking1/software/src/hail/python

I’ve been using ./gradlew clean shadowJar

I’ll let you know when I get Spark 2.0.2 working if I get the same error.

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [March 27, 2017, 7:25pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/13 "2017-03-27T19:25:42Z")

</div>

Alright, I think I know the source of this error. A Hail JAR is peculiar to a version of Spark. To work properly, you need to build with this invocation:

```auto
./gradlew clean shadowJar -Dspark.version=2.1.0

```

---

<div class="post-metadata">

**Author:** ![rmitchell](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@rmitchell](https://discuss.hail.is/u/rmitchell)\
**Post date:** [March 27, 2017, 10:09pm UTC](https://discuss.hail.is/t/hail-java-fatalerror-nosuchmethoderror-breeze-linalg-densevector-cansetd-lbreeze-generic-ufunc-inplaceimpl2/166/14 "2017-03-27T22:09:03Z")

</div>

Good news! I got logistic regression to work. I had to also install the R packages required. Thanks for your help!
