当前位置:   article > 正文

spark连接mysql报错 java.sql.SQLException: No suitable driver_at org.apache.spark.sql.execution.datasources.jdbc

at org.apache.spark.sql.execution.datasources.jdbc.jdbcoptions.$anonfun$driv

报错内容

  1. spark读取mysql数据到df报错:
  2. java.sql.SQLException: No suitable driver
  3. at java.sql.DriverManager.getDriver(DriverManager.java:315)
  4. at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions$$anonfun$6.apply(JDBCOptions.scala:105)
  5. at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions$$anonfun$6.apply(JDBCOptions.scala:105)
  6. at scala.Option.getOrElse(Option.scala:121)
  7. at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions.<init>(JDBCOptions.scala:104)
  8. at org.apache.spark.sql.execution.datasources.jdbc.JDBCOptions.<init>(JDBCOptions.scala:35)
  9. at org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:32)
  10. at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:318)
  11. at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:223)
  12. at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:211)
  13. at org.a
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/593436
推荐阅读
相关标签
  

闽ICP备14008679号