ef-labs / stash-hook-mirror

An Atlassian Stash repository hook for mirroring to one or more remote git repositories.
MIT License
77 stars 58 forks source link

Error running MirrorRepositoryHook validate #84

Open mikosh75 opened 3 years ago

mikosh75 commented 3 years ago

Hello, after upgrading to v3.1, the hook is not working anymore, with this error

2020-08-31 18:47:55,711 ERROR [http-nio-7990-exec-57] <user> @JNKL7Qx1127x1602902x0 1y7degk 2.229.36.64,0:0:0:0:0:0:0:1 "PUT /rest/api/latest/projects/EPHO/repos/xcrf/settings/hooks/com.englishtown.stash-hook-mirror:mirror-repository-hook/enabled HTTP/1.1" c.e.b.hook.MirrorRepositoryHook Error running MirrorRepositoryHook validate.
java.lang.ClassCastException: com.englishtown.bitbucket.hook.MirrorRequest cannot be cast to com.englishtown.bitbucket.hook.MirrorRequest
        at com.englishtown.bitbucket.hook.MirrorRepositoryHook.lambda$schedulePushes$0(MirrorRepositoryHook.java:177)
        at com.englishtown.bitbucket.hook.MirrorRepositoryHook.schedulePushes(MirrorRepositoryHook.java:177)
        at com.englishtown.bitbucket.hook.MirrorRepositoryHook.validate(MirrorRepositoryHook.java:138)

Also when i try to save again the setting, i get the same error

image

Also tried to remove and reinstall, but same issue. Please help! Thanks Michele

adrianluisgonzalez commented 3 years ago

This looks like the same issue as #83 . It appears Bitbucket is keeping the types from the old plugin jar in memory somewhere causing the ClassCastException. Can you try restarting Bitbucket Server?

daurrutia commented 3 years ago

Same issue here. Server restart was the workaround.