Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Exception in thread "main" java.lang.NullPointerException
at scala.collection.mutable.ArrayOps$ofRef$.length$extension(ArrayOps.scala:192)
at scala.collection.mutable.ArrayOps$ofRef.length(ArrayOps.scala:192)
at scala.collection.IndexedSeqLike$class.iterator(IndexedSeqLike.scala:90)
at scala.collection.mutable.ArrayOps$ofRef.iterator(ArrayOps.scala:186)
at RunRisk.readStocksAndFactors(RunRisk.scala:130)
at RunRisk$.main(RunRisk.scala:33)
at RunRisk.main(RunRisk.scala)
Hi,everyone, Here's the code I use:
https://paste.ubuntu.com/p/c66fmtjNm3/
and I get the following error
Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
Exception in thread "main" java.lang.NullPointerException at scala.collection.mutable.ArrayOps$ofRef$.length$extension(ArrayOps.scala:192) at scala.collection.mutable.ArrayOps$ofRef.length(ArrayOps.scala:192) at scala.collection.IndexedSeqLike$class.iterator(IndexedSeqLike.scala:90) at scala.collection.mutable.ArrayOps$ofRef.iterator(ArrayOps.scala:186) at RunRisk.readStocksAndFactors(RunRisk.scala:130) at RunRisk$.main(RunRisk.scala:33) at RunRisk.main(RunRisk.scala)
Process finished with exit code 1`
could any one help? Thanks in advance