DaiZZZZZ 2020-03-22 12:42 采纳率: 0%
浏览 1436

jekins构建失败 报错 error: cannot find symbol ,自己电脑没问题

问题

自己电脑上能运行,推代码后在jekins上执行 gradlew assemble ,构建失败,错误如下。看信息是说 BaseAnalysisInit 这个类找不到,请问这是什么原因造成的?

12:26:17 /var/lib/jenkins/workspace/java-sync/db-sync/src/main/java/com/gunma/sync/db/interceptor/DefaultDataInterceptor.java:271: error: cannot find symbol
12:26:17    protected class DefaultAnalysisInit extends BaseAnalysisInit {
12:26:17                                                ^
12:26:17   symbol:   class BaseAnalysisInit
12:26:17   location: class DefaultDataInterceptor
12:26:17 1 error
12:26:17 11 warnings
12:26:17  FAILED
12:26:17 
12:26:17 FAILURE: Build failed with an exception.
12:26:17 
12:26:17 * What went wrong:
12:26:17 Execution failed for task ':db-sync:compileJava'.
12:26:17 > Compilation failed; see the compiler error output for details.
12:26:17 
12:26:17 * Try:
12:26:17 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
12:26:17 
12:26:17 * Get more help at https://help.gradle.org
12:26:17 
12:26:17 Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
12:26:17 See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings
12:26:17 
12:26:17 BUILD FAILED in 19s
12:26:17 7 actionable tasks: 1 executed, 6 up-to-date
12:26:18 Build step 'Invoke Gradle script' changed build result to FAILURE
12:26:18 Build step 'Invoke Gradle script' marked build as failure
12:26:18 Finished: FAILURE
  • 写回答

1条回答 默认 最新

  • tomatoo_13 2023-07-25 15:26
    关注
    1. 是否包含了正确的导入语句。例如,import com.example.BaseAnalysisInit;。确保导入的路径和类名是准确的。
    2. 确保 BaseAnalysisInit 类是公共类或是位于相同包中
    3. 检查相关依赖项
    4. 检查 BaseAnalysisInit 类的源文件,确保它在其定义的位置存在,并且没有语法错误
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起