You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the hudson.plugins.cloneworkspace.CloneWorkspaceSCM plugin and my builds often fail due to a ClassCastException:
java.lang.ClassCastException: hudson.plugins.cloneworkspace.CloneWorkspaceSCM cannot be cast to hudson.plugins.git.GitSCM
at hudson.plugins.git.GitChangeSet.isCreateAccountBaseOnCommitterEmail(GitChangeSet.java:296)
The following patch would fix that issue:
- if (parent != null) {
+ if (parent != null && GitSCM.class.isAssignableFrom(parent.getBuild().getProject().getScm().getClass())) {
createAccountBaseOnCommitterEmail = ((GitSCM) parent.getBuild().getProject().getScm()).
isCreateAccountBaseOnCommitterEmail();
}
The text was updated successfully, but these errors were encountered:
Of course that is the main question, why is Hudson trying to generate a changeset from the Git Plugin in the first place when the Job itself does use another SCM, e.g: CloneWorkspace. Maybe because the cloned workspace does look like a git repo, that is just my suggestion.
The strangest thing to me is that the error does only occur sometimes/most of the time but NOT always.
I have no experience in developing Hudson plugins however, so the suggested fix would simply prevent failing builds without going too deep into the cause.
I am using the hudson.plugins.cloneworkspace.CloneWorkspaceSCM plugin and my builds often fail due to a ClassCastException:
The following patch would fix that issue:
The text was updated successfully, but these errors were encountered: