如何修复RuntimeException:读取com.snp.utils.DbUtils的Scala签名时出错:读取Scala签名时出错

时间:2018-10-23 18:57:36

标签: scala apache-spark datastax cassandra-2.0

我已经定义

var status:String = null;
var error_msg:String = null;
try{ status ="Error";  error_msg= "n/a";
 }

当我将方法放在DbUtils对象中并从主类调用时,它会引发错误,即,调用

 DbUtils.writeToCassandraAuditLog(spark, status, error_msg);

它抛出错误以下

 2018-10-23 14:03:37 ERROR java.lang.RuntimeException: error reading Scala signature of com.snp.utils.DbUtils: error reading Scala signature of org.apache.spark.sql.package: assertion failed: unsafe symbol Unstable (child of <none>) in runtime reflection universe
 at scala.reflect.internal.pickling.UnPickler.unpickle(UnPickler.scala:46)

但是当我在主类/对象中放置/定义方法时,它运行良好。

 writeToCassandraAuditLog(spark, status, error_msg);

如何解决此问题?

0 个答案:

没有答案