gitlab4j / gitlab4j-api

GitLab4J API (gitlab4j-api) provides a full featured Java client library for working with GitLab repositories via the GitLab REST API
MIT License
1.06k stars 454 forks source link

IDEA Plugin Project:KotlinModule not a sub type #1011

Open keleus opened 1 year ago

keleus commented 1 year ago

My IDEA Plugin Project used Java and kotlin.

when call projectApi:

1. java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: com.fasterxml.jackson.module.kotlin.KotlinModule not a subtype
2. java.lang.IllegalStateException: Unable to perform operation: post construct on org.glassfish.jersey.jackson.internal.DefaultJacksonJaxbJsonProvider
GeekyWizKid commented 1 year ago

I encountered the same issue. Has it been resolved?

GeekyWizKid commented 1 year ago

I used the org.gitlab4j:gitlab4j-api:4.17.0 and it works properly

keleus commented 1 year ago

@GeekyWizKid

I encountered the same issue. Has it been resolved?

我直接在kotlin中使用okhttp去调用gitlab了。也避免后续因为引入这个项目带来其它的问题。

GeekyWizKid commented 1 year ago

自己重新封装吗

GeekyWizKid commented 1 year ago

感谢回复

jmini commented 1 year ago

I used the org.gitlab4j:gitlab4j-api:4.17.0 and it works properly

This probably means that the Jersey library that is used here does not fit with the IDEA Plugin tech stack (I am not familiar with it).

There is an open thread about the HTTP client that should be used: https://github.com/gitlab4j/gitlab4j-api/issues/924 Feel free to join that discussion.

In theory this lib should mainly provide the Java models to perform the HTTP calls (to model requests and responses) and do not really care about the underlying HTTP client (but this has to be called)

okhttp might not be a good solution for plain Java projects.

Maybe one first step could be to separate the Api classes that rely on Jersey from the model class that could be re-used.

linrol commented 6 months ago

I encountered the same issue.

wenxiaoyu commented 1 week ago

I encountered the same issue.

wenxiaoyu commented 1 week ago

I used the org.gitlab4j:gitlab4j-api:4.17.0 and it works properly

thanks very much.