seaTunnel web 部署踩坑记录

换个名字真难 2024-07-20 11:33:01 阅读 50

一、启动异常org.apache.seatunnel.api.sink.SchemaSaveMode not found

在部署过程中严格安装官方的文档操作,web服务启动时报错无法运行

1、java.lang.ClassNotFoundException: org.apache.seatunnel.api.sink.SchemaSaveMode

下载seatunnel 文本官方提供的安装包seaTunnel下载地址,我下载的是官方最新版1.0.1,按官方要求,将hazelcast-client.yaml、plugin-mapping.properties配置文件移入conf文件夹下,自行下载数据源包放入libs目录,使用启动命令启动web服务,启动报错

<code>./bin/seatunnel-backend-daemon.sh start

错误如下:

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.seatunnel.app.bean.connector.ConnectorCache]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/seatunnel/api/sink/SchemaSaveMode

at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:224)

...

Caused by: java.lang.NoClassDefFoundError: org/apache/seatunnel/api/sink/SchemaSaveMode

at org.apache.seatunnel.connectors.doris.config.DorisOptions.<clinit>(DorisOptions.java:204)

at org.apache.seatunnel.connectors.doris.sink.DorisSinkFactory.optionRule(DorisSinkFactory.java:57)

at org.apache.seatunnel.api.table.factory.FactoryUtil.sinkFullOptionRule(FactoryUtil.java:282)

at org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery.lambda$getAllPlugin$5(AbstractPluginDiscovery.java:273)

at java.lang.Iterable.forEach(Iterable.java:75)

at org.apache.seatunnel.plugin.discovery.AbstractPluginDiscovery.getAllPlugin(AbstractPluginDiscovery.java:248)

at org.apache.seatunnel.app.thirdparty.framework.PluginDiscoveryUtil.getAllConnectors(PluginDiscoveryUtil.java:126)

...

Caused by: java.lang.ClassNotFoundException: org.apache.seatunnel.api.sink.SchemaSaveMode

at java.net.URLClassLoader.findClass(URLClassLoader.java:387)

at java.lang.ClassLoader.loadClass(ClassLoader.java:418)

at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

... 33 common frames omitted

重点错误:

Caused by: java.lang.NoClassDefFoundError: org/apache/seatunnel/api/sink/SchemaSaveMode

根据错误路径,找到

org.apache.seatunnel.api

重点来了

位于seatunnel-api-2.3.3.jar中,反编译后发现包内缺失没有org/apache/seatunnel/api/sink/SchemaSaveMode类,发现1.0.1版本中用的2.3.5版本的Seatunnel,但这里使用的是seatunnel-api.2.3.3.jar,所以猜测是版本不符导致,从maven下载seatunnel-api.2.3.5.jar包,并进行反编译检查,果然存在

解决版本:

下载seatunnel-api.2.3.5.jar,替换libs下的seatunnel-api.2.3.3.jar,重新启动服务,服务正常。



声明

本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。