Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running MirrorRepositoryHook validate #84

Open
mikosh75 opened this issue Aug 31, 2020 · 3 comments
Open

Error running MirrorRepositoryHook validate #84

mikosh75 opened this issue Aug 31, 2020 · 3 comments

Comments

@mikosh75
Copy link

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
Copy link
Member

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
Copy link

Same issue here. Server restart was the workaround.

@Jahimees
Copy link

And again for people who have the same issue. I know it's been a long time. But if necessary, I adapted the plugin for version 8.* and added the ability to authenticate with a personal token.
https://github.com/Jahimees/stash-hook-mirror

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants