gitlab4j-api
gitlab4j-api copied to clipboard
IDEA Plugin Project:KotlinModule not a sub type
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
I encountered the same issue. Has it been resolved?
I used the org.gitlab4j:gitlab4j-api:4.17.0 and it works properly
@GeekyWizKid
I encountered the same issue. Has it been resolved?
我直接在kotlin中使用okhttp去调用gitlab了。也避免后续因为引入这个项目带来其它的问题。
自己重新封装吗
感谢回复
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.
I encountered the same issue.