otter 自定义扩展报错Check that your class path includes tools.jar

nom7f22z  于 2022-12-31  发布在  其他
关注(0)|答案(3)|浏览(188)

otter 版本4.2.18
otter 自定义扩展报错
Caused by: java.lang.IllegalStateException: Cannot find the system Java compiler. Check that your class path includes tools.jar

2021-07-14 11:32:55.634 [pipelineId = 3,taskName = ExtractWorker] WARN c.a.o.s.a.i.setl.zookeeper.termin.WarningTerminProcess - nid:1[3:setl:com.alibaba.otter.shared.common.utils.compile.exception.CompileExprException: compile error, source :
com.dongao.TestEventProcessor2
at com.alibaba.otter.shared.common.utils.compile.impl.JdkCompiler.compile(JdkCompiler.java:60)
at com.alibaba.otter.shared.common.utils.extension.DefaultExtensionFactory.getExtensionInternal(DefaultExtensionFactory.java:63)
at com.alibaba.otter.shared.common.utils.extension.DefaultExtensionFactory.access$000(DefaultExtensionFactory.java:33)
at com.alibaba.otter.shared.common.utils.extension.DefaultExtensionFactory$1.apply(DefaultExtensionFactory.java:44)
at com.alibaba.otter.shared.common.utils.extension.DefaultExtensionFactory$1.apply(DefaultExtensionFactory.java:41)
at com.alibaba.otter.shared.common.utils.cache.ExtensionMemoryMirror.get(ExtensionMemoryMirror.java:65)
at com.alibaba.otter.shared.common.utils.extension.DefaultExtensionFactory.getExtension(DefaultExtensionFactory.java:50)
at com.alibaba.otter.node.etl.extract.extractor.ProcessorExtractor.extract(ProcessorExtractor.java:81)
at com.alibaba.otter.node.etl.extract.extractor.ProcessorExtractor.extract(ProcessorExtractor.java:51)
at com.alibaba.otter.node.etl.extract.extractor.OtterExtractorFactory.extract(OtterExtractorFactory.java:50)
at com.alibaba.otter.node.etl.extract.ExtractTask$1.run(ExtractTask.java:79)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Cannot find the system Java compiler. Check that your class path includes tools.jar
at com.alibaba.otter.shared.common.utils.compile.impl.JdkCompileTask.(JdkCompileTask.java:61)
at com.alibaba.otter.shared.common.utils.compile.impl.JdkCompiler.compile(JdkCompiler.java:50)
... 15 more

fjnneemd

fjnneemd3#

异常现场:

windows服务器,该异常是在使用otter同步时,编译加载自定义的DataProcess报的异常,Cannot find the system Java compiler. Check that your class path includes tools.jar。

异常原因:

java8在windows服务器上安装的时候会自动填充环境变量,如:C:\Program Files (x86)\Common Files\Oracle\Java\javapath指向java.exe,

项目启动的时候,没通过脚本指定环境变量,将默认从系统环境变量path自左向右搜索,如果自己配置的环境变量在自动填充的环境变量之后,会使用jdk自动配置的环境变量,所以提示Cannot find the system Java compiler. Check that your class path includes tools.jar。

异常解决:

1、将系统自动配置的java环境变量删除,再配置自定义的环境变量;

2、在系统自动配置的java环境变量左边配置自定义的环境变量,建议直接放在path开头。
————————————————
版权声明:本文为CSDN博主「foreveri7」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接: https://blog.csdn.net/technology01/article/details/115331150

相关问题