java.lang.IllegalAccessError while using spring batch to get the list of executions -
i getting error when trying run spring batch load list of executions.
java.lang.illegalaccesserror: tried access method org.springframework.batch.core.repository.dao.jdbcjobexecutiondao.getjobparameters(ljava/lang/long;)lorg/springframework/batch/core/jobparameters; class org.springframework.batch.admin.service.jdbcsearchablejobexecutiondao
after doing analysis, found jdbcjobexecutiondao part of spring-batch , has implementation of getjobparameters() protected method while, jdbcsearchablejobexecutiondao part of spring-batch-admin has extended jdbcjobexecutiondao.
so per oracle documentation, says illegalaccesserror -
thrown if application attempts access or modify field or call method not have access to.
normally, error caught compiler; error can occur @ run time if definition of class has incompatibly changed.
i don't understand, don't have control on these jars/classes. doing wrong while using them? or there problem versions using both jars.
spring-batch - version 2.2.0.release
spring-batch-admin - version 1.3.0.build-snapshot(tried 1.3.0.release also)
refered sites - java.lang.illegalaccesserror: tried access method
so, fixed using proper versions. version mismatch problem between spring-batch & spring-batch-admin. referred spring docs site , tried recommended versions , worked!
http://docs.spring.io/spring-batch-admin/spring-batch-admin-manager/dependencies.html
so, using
2.2.7.release(spring-batch)
with
1.3.1.release(spring-batch-admin)
and not getting java.lang.illegalaccesserror
anymore. need check if other functionalities have been disturbed because old project.
hope helps facing similar problem.
Comments
Post a Comment