当前位置: 首页 > article >正文

Seatunnel运行时报错Caused by: java.lang.NoClassDefFoundError: com/mysql/cj/MysqlType

报错

在这里插入图片描述

===============================================================================


[] 2024-11-21 16:46:27,526 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Fatal Error, 

[] 2024-11-21 16:46:27,526 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Please submit bug report in https://github.com/apache/seatunnel/issues

[] 2024-11-21 16:46:27,526 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Reason:SeaTunnel job executed failed 

[] 2024-11-21 16:46:27,528 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Exception StackTrace:org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:213)
	at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
	at org.apache.seatunnel.example.engine.SeaTunnelEngineExample.main(SeaTunnelEngineExample.java:43)
Caused by: org.apache.seatunnel.api.table.factory.FactoryException: ErrorCode:[API-06], ErrorDescription:[Factory initialize failed] - Unable to create a source for identifier 'jdbc'.
	at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:101)
	at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSource(MultipleTableJobConfigParser.java:375)
	at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:209)
	at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:114)
	at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:182)
	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:160)
	... 2 more
Caused by: java.lang.NoClassDefFoundError: com/mysql/cj/MysqlType
	at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.mysql.MysqlDialect.<clinit>(MysqlDialect.java:52)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.mysql.MySqlDialectFactory.create(MySqlDialectFactory.java:47)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialectLoader.load(JdbcDialectLoader.java:97)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialectLoader.load(JdbcDialectLoader.java:40)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSourceFactory.createSource(JdbcSourceFactory.java:73)
	at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:112)
	at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:74)
	... 7 more
Caused by: java.lang.ClassNotFoundException: com.mysql.cj.MysqlType
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 14 more
 
[] 2024-11-21 16:46:27,528 ERROR org.apache.seatunnel.core.starter.SeaTunnel - 
===============================================================================



Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:213)
	at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
	at org.apache.seatunnel.example.engine.SeaTunnelEngineExample.main(SeaTunnelEngineExample.java:43)
Caused by: org.apache.seatunnel.api.table.factory.FactoryException: ErrorCode:[API-06], ErrorDescription:[Factory initialize failed] - Unable to create a source for identifier 'jdbc'.
	at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:101)
	at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSource(MultipleTableJobConfigParser.java:375)
	at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:209)
	at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:114)
	at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:182)
	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:160)
	... 2 more
Caused by: java.lang.NoClassDefFoundError: com/mysql/cj/MysqlType
	at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.mysql.MysqlDialect.<clinit>(MysqlDialect.java:52)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.mysql.MySqlDialectFactory.create(MySqlDialectFactory.java:47)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialectLoader.load(JdbcDialectLoader.java:97)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialectLoader.load(JdbcDialectLoader.java:40)
	at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSourceFactory.createSource(JdbcSourceFactory.java:73)
	at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:112)
	at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:74)
	... 7 more
Caused by: java.lang.ClassNotFoundException: com.mysql.cj.MysqlType
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 14 more

报错原因

pom中依赖的作用域有问题

解决方法

把这个注释掉然后刷新maven
这个pom的位置是
\seatunnel-2.3.8\seatunnel-connectors-v2\connector-jdbc\pom.xml
在这里插入图片描述
修改之后成功运行
在这里插入图片描述


http://www.kler.cn/a/404270.html

相关文章:

  • 半导体工艺与制造篇5 光刻
  • sed使用扩展正则表达式时, -i 要写在 -r 或 -E 的后面
  • 徒手从零搭建一套ELK日志平台
  • maven父子项目
  • Oracle 到 Elasticsearch 数据迁移同步
  • 定长滑动窗口(LeetCode——1423.可获得的最大点数)
  • 2024年亚太地区数学建模大赛C题-宠物行业及相关行业的发展分析与策略
  • 如何查看 Android 项目的依赖结构树
  • 集成学习的起源与哲学
  • Qt添加外部库:静态库和动态库,批量添加头文件
  • 【XSS】payload#1
  • 利用oss进行数据库和网站图片备份
  • Flowable第三篇、Flowable之任务分配(任务分配、流程变量、候选人和候选人组)
  • 【Lucene】搜索引擎和文档相关性评分 BM25 算法的工作原理
  • 大数据新视界 -- 大数据大厂之 Impala 性能优化:资源分配与负载均衡的协同(下)(24 / 30)
  • 如何使用GPT API 自定义 自己的 RAG
  • [羊城杯 2020]easyre
  • Java基础夯实——2.6 Java中的锁
  • 【Linux网络编程】套接字使用--TCP echo server的实现
  • 【腾讯云产品最佳实践】腾讯云CVM入门技术与实践:通过腾讯云快速构建云上应用
  • Jmeter中的断言(三)
  • 《Vue零基础入门教程》第一课:Vue简介
  • 初识ArkUI
  • SAP BC 记录一次因为HANA服务器内存满的问题
  • 如何选择合适的数据集成工具或平台来实现全域数据的高效整合
  • 机器学习之量子机器学习(Quantum Machine Learning, QML)