datax-web icon indicating copy to clipboard operation
datax-web copied to clipboard

[BUG] v2.1.2 编译报错

Open skymoou opened this issue 2 years ago • 2 comments

[INFO] Changes detected - recompiling the module! [INFO] Compiling 38 source files to /opt/datax-web/datax-web-v-2.1.2/datax-core/target/classes [INFO] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/util/ProcessUtil.java: Some input files use or override a deprecated API. [INFO] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/util/ProcessUtil.java: Recompile with -Xlint:deprecation for details. [INFO] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/thread/TriggerCallbackThread.java: Some input files use unchecked or unsafe operations. [INFO] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/thread/TriggerCallbackThread.java: Recompile with -Xlint:unchecked for details. [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[11,24] package javax.annotation does not exist [ERROR] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[45,54] cannot find symbol symbol: class Resource location: class com.wugui.datatx.core.glue.impl.SpringGlueFactory [ERROR] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[47,21] cannot find symbol symbol: class Resource location: class com.wugui.datatx.core.glue.impl.SpringGlueFactory [ERROR] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[47,78] cannot find symbol symbol: class Resource location: class com.wugui.datatx.core.glue.impl.SpringGlueFactory [INFO] 4 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for datax-web 2.1.2: [INFO] [INFO] datax-web .......................................... SUCCESS [ 0.221 s] [INFO] datax-rpc .......................................... SUCCESS [ 2.436 s] [INFO] datax-core ......................................... FAILURE [ 0.423 s] [INFO] datax-admin ........................................ SKIPPED [INFO] datax-executor ..................................... SKIPPED [INFO] datax-assembly ..................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.267 s [INFO] Finished at: 2022-09-20T15:48:20+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project datax-core: Compilation failure: Compilation failure: [ERROR] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[11,24] package javax.annotation does not exist [ERROR] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[45,54] cannot find symbol [ERROR] symbol: class Resource [ERROR] location: class com.wugui.datatx.core.glue.impl.SpringGlueFactory [ERROR] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[47,21] cannot find symbol [ERROR] symbol: class Resource [ERROR] location: class com.wugui.datatx.core.glue.impl.SpringGlueFactory [ERROR] /opt/datax-web/datax-web-v-2.1.2/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[47,78] cannot find symbol [ERROR] symbol: class Resource [ERROR] location: class com.wugui.datatx.core.glue.impl.SpringGlueFactory [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :datax-core

环境信息: java 18.0.1.1 2022-04-22 Java(TM) SE Runtime Environment (build 18.0.1.1+2-6) Java HotSpot(TM) 64-Bit Server VM (build 18.0.1.1+2-6, mixed mode, sharing)

Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0) Maven home: /usr/local/maven Java version: 18.0.1.1, vendor: Oracle Corporation, runtime: /usr/local/jdk8 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-957.el7.x86_64", arch: "amd64", family: "unix"

skymoou avatar Sep 20 '22 07:09 skymoou

[WARNING] [WARNING] Some problems were encountered while building the effective settings [WARNING] Unrecognised tag: 'profile' (position: START_TAG seen ... -->\n ... @31:18) @ /Users/wangkang/.m2/settings.xml, line 31, column 18 [WARNING] [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.wugui:datax-admin:jar:2.1.2 [WARNING] 'dependencies.dependency.systemPath' for com.oracle:ojdbc6:jar should not point at files within the project directory, ${basedir}/src/main/lib/ojdbc6-11.2.0.3.jar will be unresolvable by dependent projects @ line 163, column 25 [WARNING] 'dependencies.dependency.systemPath' for com.microsoft.sqlserver:sqljdbc4:jar should not point at files within the project directory, ${basedir}/src/main/lib/sqljdbc4-4.0.jar will be unresolvable by dependent projects @ line 171, column 25 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 801, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for com.wugui:datax-executor:jar:2.1.2 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 50, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] datax-web [pom] [INFO] datax-rpc [jar] [INFO] datax-core [jar] [INFO] datax-admin [jar] [INFO] datax-executor [jar] [INFO] datax-assembly [jar] [INFO] [INFO] ------------------------< com.wugui:datax-web >------------------------- [INFO] Building datax-web 2.1.2 [1/6] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ datax-web --- [INFO] Installing /Users/wangkang/Desktop/baidu/datax-web/pom.xml to /Users/wangkang/.m2/repository/com/wugui/datax-web/2.1.2/datax-web-2.1.2.pom [INFO] [INFO] ------------------------< com.wugui:datax-rpc >------------------------- [INFO] Building datax-rpc 2.1.2 [2/6] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ datax-rpc --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ datax-rpc --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 74 source files to /Users/wangkang/Desktop/baidu/datax-web/datax-rpc/target/classes [INFO] /Users/wangkang/Desktop/baidu/datax-web/datax-rpc/src/main/java/com/wugui/datax/rpc/remoting/invoker/XxlRpcInvokerFactory.java: 某些输入文件使用或覆盖了已过时的 API。 [INFO] /Users/wangkang/Desktop/baidu/datax-web/datax-rpc/src/main/java/com/wugui/datax/rpc/remoting/invoker/XxlRpcInvokerFactory.java: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。 [INFO] /Users/wangkang/Desktop/baidu/datax-web/datax-rpc/src/main/java/com/wugui/datax/rpc/remoting/invoker/XxlRpcInvokerFactory.java: 某些输入文件使用了未经检查或不安全的操作。 [INFO] /Users/wangkang/Desktop/baidu/datax-web/datax-rpc/src/main/java/com/wugui/datax/rpc/remoting/invoker/XxlRpcInvokerFactory.java: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。 [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ datax-rpc --- [INFO] Not copying test resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ datax-rpc --- [INFO] Not compiling test sources [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ datax-rpc --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ datax-rpc --- [INFO] Building jar: /Users/wangkang/Desktop/baidu/datax-web/datax-rpc/target/datax-rpc-2.1.2.jar [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ datax-rpc --- [INFO] Installing /Users/wangkang/Desktop/baidu/datax-web/datax-rpc/target/datax-rpc-2.1.2.jar to /Users/wangkang/.m2/repository/com/wugui/datax-rpc/2.1.2/datax-rpc-2.1.2.jar [INFO] Installing /Users/wangkang/Desktop/baidu/datax-web/datax-rpc/pom.xml to /Users/wangkang/.m2/repository/com/wugui/datax-rpc/2.1.2/datax-rpc-2.1.2.pom [INFO] [INFO] ------------------------< com.wugui:datax-core >------------------------ [INFO] Building datax-core 2.1.2 [3/6] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ datax-core --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ datax-core --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 38 source files to /Users/wangkang/Desktop/baidu/datax-web/datax-core/target/classes [INFO] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/util/ProcessUtil.java: 某些输入文件使用或覆盖了已过时的 API。 [INFO] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/util/ProcessUtil.java: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。 [INFO] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/thread/TriggerCallbackThread.java: 某些输入文件使用了未经检查或不安全的操作。 [INFO] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/thread/TriggerCallbackThread.java: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。 [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[11,24] 程序包javax.annotation不存在 [ERROR] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[45,54] 找不到符号 符号: 类 Resource 位置: 类 com.wugui.datatx.core.glue.impl.SpringGlueFactory [ERROR] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[47,21] 找不到符号 符号: 类 Resource 位置: 类 com.wugui.datatx.core.glue.impl.SpringGlueFactory [ERROR] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[47,78] 找不到符号 符号: 类 Resource 位置: 类 com.wugui.datatx.core.glue.impl.SpringGlueFactory [INFO] 4 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for datax-web 2.1.2: [INFO] [INFO] datax-web .......................................... SUCCESS [ 0.172 s] [INFO] datax-rpc .......................................... SUCCESS [ 2.267 s] [INFO] datax-core ......................................... FAILURE [ 0.447 s] [INFO] datax-admin ........................................ SKIPPED [INFO] datax-executor ..................................... SKIPPED [INFO] datax-assembly ..................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.064 s [INFO] Finished at: 2023-02-22T14:41:34+08:00 [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "nexus" could not be activated because it does not exist. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project datax-core: Compilation failure: Compilation failure: [ERROR] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[11,24] 程序包javax.annotation不存在 [ERROR] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[45,54] 找不到符号 [ERROR] 符号: 类 Resource [ERROR] 位置: 类 com.wugui.datatx.core.glue.impl.SpringGlueFactory [ERROR] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[47,21] 找不到符号 [ERROR] 符号: 类 Resource [ERROR] 位置: 类 com.wugui.datatx.core.glue.impl.SpringGlueFactory [ERROR] /Users/wangkang/Desktop/baidu/datax-web/datax-core/src/main/java/com/wugui/datatx/core/glue/impl/SpringGlueFactory.java:[47,78] 找不到符号 [ERROR] 符号: 类 Resource [ERROR] 位置: 类 com.wugui.datatx.core.glue.impl.SpringGlueFactory [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :datax-core

编译报错

wk19921225 avatar Feb 22 '23 06:02 wk19921225

看下使用的maven仓库,如果用的阿里云的,可能会有问题,我用阿里云的会报这个错,加上maven官方的仓库就可以了

pxvp2008 avatar Aug 19 '23 05:08 pxvp2008