嘗試運行spring批處理以加載執行列表時出現此錯誤。使用spring批處理獲取執行列表時發生java.lang.IllegalAccessError
java.lang.IllegalAccessError: tried to access method org.springframework.batch.core.repository.dao.JdbcJobExecutionDao.getJobParameters(Ljava/lang/Long;)Lorg/springframework/batch/core/JobParameters; from class org.springframework.batch.admin.service.JdbcSearchableJobExecutionDao
做一些分析後,我發現JdbcJobExecutionDao是春季批次的一部分,並且具有getJobParameters的實現()的保護方法,同時,JdbcSearchableJobExecutionDao是春季批次管理員已經延長了JdbcJobExecutionDao的一部分。
所以按照Oracle文檔,它說,IllegalAccessError是 -
Thrown if an application attempts to access or modify a field or to call a method that it does not have access to.
Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
我不明白,我並沒有對這些罐子/類控制。我在使用它們時做錯了什麼?或者我用於兩個罐子的版本有問題。
彈簧批次 - 版本2.2.0.RELEASE
彈簧批次管理 - 版本1.3.0.BUILD-快照(與1.3.0.RELEASE也試過)
Refered到網站 - java.lang.IllegalAccessError: tried to access method