Question
Getting runtime Error while executing JGit funtionality
I am trying to connect PEGA with GitHub using jGit jar - org.eclipse.jgit-5.4.2.201908231537-r.jar
we added all required jar in PEGA Class path, so we are not getting any compilation error.
when executing below code
LsRemoteCommand remoteCmd = Git.lsRemoteRepository().setCredentialsProvider(this.getCp()).setRemote(repo).setTags(true).setHeads(true);
try {
refList = remoteCmd.call();
}
we are getting - "java.lang.IllegalAccessError: Class org/eclipse/jgit/lib/ObjectId illegally accessing "package private" member of class org/eclipse/jgit/lib/AnyObjectId"
logs attached.
both class 'ObjectID' and 'AnyObjectID' are present in jgit jar.
we tested same funcationality in java programming and it is working fine.
PEGA - 7.4
JRE - jre1.8.0_211
WebSphere - 9.0.0.11
There could be class conflict with your running environment. How did you add jgit jars? Importing to database or configure as shared library on the Websphere? I suggest start with the shared lib approach.