gitlab4j-api icon indicating copy to clipboard operation
gitlab4j-api copied to clipboard

IDEA Plugin Project:KotlinModule not a sub type

Open keleus opened this issue 1 year ago • 9 comments

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

keleus avatar Jul 31 '23 04:07 keleus

I encountered the same issue. Has it been resolved?

GeekyWizKid avatar Aug 09 '23 07:08 GeekyWizKid

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

GeekyWizKid avatar Aug 10 '23 06:08 GeekyWizKid

@GeekyWizKid

I encountered the same issue. Has it been resolved?

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

keleus avatar Aug 10 '23 07:08 keleus

自己重新封装吗

GeekyWizKid avatar Aug 10 '23 07:08 GeekyWizKid

感谢回复

GeekyWizKid avatar Aug 10 '23 07:08 GeekyWizKid

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.

jmini avatar Aug 15 '23 07:08 jmini

I encountered the same issue.

linrol avatar Mar 20 '24 08:03 linrol