I am Getting this error when trying to run spring batch to load the list of executions.
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
After doing some analysis, I found that JdbcJobExecutionDao is part of Spring-batch and has the implementation of getJobParameters() as protected method while, JdbcSearchableJobExecutionDao is part of spring-batch-admin which has extended the JdbcJobExecutionDao.
So as per the Oracle documentation, it says that IllegalAccessError is -
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.
I don't understand, I don't have control over these jars/classes. Am I doing something wrong while using them? or is there a problem with the versions I am using for both jars.
spring-batch - version 2.2.0.RELEASE
spring-batch-admin - version 1.3.0.BUILD-SNAPSHOT(Tried with 1.3.0.RELEASE also)
Refered to sites - java.lang.IllegalAccessError: tried to access method