alibaba / DataX

DataX是阿里云DataWorks数据集成的开源版本。
Other
15.92k stars 5.43k forks source link

本地部署没有问题,部署到服务器报错ClassNotFoundException: com.alibaba.datax.plugin.writer.doriswriter.DorisWriter$Job #2066

Open sunyanhui123 opened 8 months ago

sunyanhui123 commented 8 months ago

项目中新引入了doriswriter, 在本地调试成功后,部署服务器运行报错 at com.alibaba.datax.core.Engine.start(Engine.java:92) [datax-core-1.0.1.jar:na] at com.alibaba.datax.core.Engine.entry(Engine.java:171) [datax-core-1.0.1.jar:na] at com.alibaba.datax.core.Engine.main(Engine.java:210) [datax-core-1.0.1.jar:na] Caused by: java.lang.ClassNotFoundException: com.alibaba.datax.plugin.writer.doriswriter.DorisWriter$Job at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_202] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_202] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_202] at com.alibaba.datax.core.util.container.LoadUtil.loadPluginClass(LoadUtil.java:173) ~[datax-core-1.0.1.jar:na] ... 7 common frames omitted 2024-03-06 10:26:22.547 [job-0] INFO StandAloneJobContainerCommunicator - Total 0 records, 0 bytes | Speed 0B/s, 0 records/s | Error 0 records, 0 bytes | All Task WaitWriterTime 0.000s | All Task WaitReaderTime 0.000s | Percentage 0.00% 2024-03-06 10:26:22.548 [job-0] ERROR Engine -

    经DataX智能分析,该任务最可能的错误原因是:
    com.alibaba.datax.common.exception.DataXException: Code:[Framework-02], Description:[DataX引擎运行过程出错,具体原因请参看DataX运行结束时的错误诊断信息  .].  - java.lang.ClassNotFoundException: com.alibaba.datax.plugin.writer.doriswriter.DorisWriter$Job
            at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
            at com.alibaba.datax.core.util.container.LoadUtil.loadPluginClass(LoadUtil.java:173)
            at com.alibaba.datax.core.util.container.LoadUtil.loadJobPlugin(LoadUtil.java:93)
            at com.alibaba.datax.core.job.JobContainer.initJobWriter(JobContainer.java:691)
            at com.alibaba.datax.core.job.JobContainer.init(JobContainer.java:304)
            at com.alibaba.datax.core.job.JobContainer.start(JobContainer.java:113)
            at com.alibaba.datax.core.Engine.start(Engine.java:92)
            at com.alibaba.datax.core.Engine.entry(Engine.java:171)
            at com.alibaba.datax.core.Engine.main(Engine.java:210)
FuYouJ commented 8 months ago

本地怎么调式的? 线上怎么安装的插件

sunyanhui123 commented 8 months ago

问题已经找到,打包方式有问题,导致doriswriter没有打进包里,修改了一下打包文件问题解决