TJ-Bot icon indicating copy to clipboard operation
TJ-Bot copied to clipboard

GitHub API and Open-AI crashes with Jackson update

Open Zabuzard opened this issue 4 months ago • 3 comments

GitHub-API

We have just updated our Jackson (#1313) and that leads to the bot crashing:

java.lang.NoSuchFieldError: Class com.fasterxml.jackson.databind.PropertyNamingStrategy does not have member field 'com.fasterxml.jackson.databind.PropertyNamingStrategy SNAKE_CASE'
     at org.kohsuke.github.GitHubClient.<clinit>(GitHubClient.java:92)
     at org.kohsuke.github.GitHub.<init>(GitHub.java:137)
     at org.kohsuke.github.GitHubBuilder.build(GitHubBuilder.java:509)
     at org.kohsuke.github.GitHub.connectUsingOAuth(GitHub.java:401)
     at org.togetherjava.tjbot.features.github.GitHubReference.acquireRepositories(GitHubReference.java:99)
     at org.togetherjava.tjbot.features.github.GitHubReference.<init>(GitHubReference.java:89)
     at org.togetherjava.tjbot.features.Features.createFeatures(Features.java:117)
     at org.togetherjava.tjbot.features.system.BotCore.<init>(BotCore.java:90)
     at org.togetherjava.tjbot.Application.runBot(Application.java:91)
     at org.togetherjava.tjbot.Application.main(Application.java:65)

Reason is this foreign code:

static {
    MAPPER.setVisibility(new VisibilityChecker.Std(NONE, NONE, NONE, NONE, ANY));
    MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    MAPPER.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS, true);
    MAPPER.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
}

from GitHubClient coming from this dependency:

implementation 'org.kohsuke:github-api:1.329'

So apparently this dependency is using our Jackson instead of its own, leading to the crash.

Until this is fixed, Jackson can not be updated anymore, our pipeline is blocked.

This also includes the GitHub-API itself whose newest version updates its Jackson and that bleeds into our dependency...

Open-AI

The same happens with Open-AI apparently:

error

Cant update Jackson.

Zabuzard avatar Aug 29 '25 07:08 Zabuzard