Skip to content

Conversation

@mymarche
Copy link

@mymarche mymarche commented Jan 31, 2022

Hi, all!

I need some help with this bug.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@didacrarbones
Copy link

Hi! Any timeline on this being merged and released?

@mymarche
Copy link
Author

mymarche commented Feb 7, 2022

@didacrarbones Hi!
this PR in Draft because it don't working 😞

@didacrarbones
Copy link

Alright, thanks. I just saw all the checks green and I thought there was something else holding it up.

@jetersen
Copy link
Member

jetersen commented Feb 7, 2022

I don't see a dependency on Jersey. Potentially it would be easier to exclude it from the dependency that is pulling it in transitively, are we sure we even use that dependency even transitively?

Nvm Gitlab4j uses it: https://github.com/gitlab4j/gitlab4j-api/search?q=jersey 😅

Suggestion is to create a jersey api plugin and than exclude it from gitlab4j and than depend on this jersey api plugin to make Jenkins loading it correctly.

if it is a class cast issue it could also be easier to avoid using gitlab4j classes directly in anything that needs to be serialized.

@mymarche
Copy link
Author

mymarche commented Feb 7, 2022

@jetersen Yes, i tried to use jersey2-api-plugin,
but then i cought error in serializing jsons when jersey2-api-plugin need some classess from gitlab-api-plugin.

I read this and tried to use pluginFirstClassLoader.
But this didn't work too.

@jetersen
Copy link
Member

jetersen commented Feb 7, 2022

need some classess from gitlab-api-plugin

which? seems like jersey2-api-plugin is using the jersey bom. Perhaps you can declare a dependency on the missing jersey dep without version because bom has the correct version?

@dcendents
Copy link
Contributor

I tried pluginFirstClassLoader, I tried shading jersey (needs to be done in gitlab4j-api though, not in this plugin), but nothing was working.

I actually found that the problem when using jersey2-api is that is also contains jersey-media-json-binding and then jersey uses eclipse yasson instead of jackson (I had a ClassNotFoundException trying to load an enum from gitlab4j-api).

I have open PR #7 which is also in Draft as we need modifications in both gitlab4j-api and jersey2-api.

@mymarche
Copy link
Author

mymarche commented Feb 11, 2022

@dcendents Thank you.
then I will closing this PR.

@mymarche mymarche closed this Feb 11, 2022
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

Successfully merging this pull request may close these issues.

4 participants