error: object MultivariateNormalDistribution is not a member of package
程序员文章站
2022-07-13 22:22:52
...
完整报错如下:
RunRisk.scala:11: error: object MultivariateNormalDistribution is not a member of package org.apache.commons.math3.distribution
[INFO] import org.apache.commons.math3.distribution.MultivariateNormalDistribution
[INFO] ^
[ERROR] src/main/scala/RunRisk.scala:185: error: not found: type MultivariateNormalDistribution
[INFO] val multivariateNormal = new MultivariateNormalDistribution(rand, factorMeans,
[INFO] ^
[ERROR] two errors found
org/apache/commons/commons-math3/3.4.1
上述报错的原因是commons-math3版本太低导致的。
解决方案:
pom.xml中commons-math3修改为:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.6.1</version>
</dependency>
下一篇: 1、kubernetes系统初始化
推荐阅读
-
【Spark】error: value foreach is not a member of Object
-
error: object MultivariateNormalDistribution is not a member of package
-
求大神纠错,多谢!Fatal error: Call to a member function query() on a non-object
-
Fatal error: Call to a member function fetch_array() on a non-object in 62 line
-
Fatal error: Call to a member function fetch_array() on a non-object in 62 line
-
【】Fatal error: Call to a member function * on a non-object
-
Fatal error: Call to a member function fetch_array() on a non-object in 62 line,该如何处理
-
Error:cannot call member function without object
-
[Error] cannot call member function ‘‘ without object
-
Fatal error: Call to a member function fetch_array() on a non-object 错误