tcplugins / tcWebHooks

WebHooks plugin for Teamcity. Supports many build states and payload formats.
https://netwolfuk.wordpress.com/category/teamcity/tcplugins/tcwebhooks/
157 stars 30 forks source link

Web Hooks REST API (tcWebHooks) failed to initialize Spring Context #237

Closed fengzmgit closed 6 months ago

fengzmgit commented 6 months ago

Expected Behavior

The plugin (version 1.2.5) should load without error.

Current Behavior

The plugin failed to initialize Spring Context. Below is the error message.

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jetbrains.buildServer.serverSide.BuildServerListenerEventDispatcher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [webhook.teamcity.server.rest.jersey.MainConfigManagerProvider] for bean with name 'mainConfigManagerProvider' defined in Byte array resource [plugin: tcWebHooks-rest-api#tcwebhooks-rest-api-1.2.5-build.480-jar-with-dependencies.jar!/META-INF/build-server-plugin-RESTListener.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com/sun/jersey/spi/inject/InjectableProvider at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) at

Steps to Reproduce (for bugs)

It happens after Teancity upgrading to 2024.03. The plugin (an old version) failed to load after upgrading. Then I upgrade the plugin to 1.2.5, from UI. It still failed to load. Below are the steps to reproduce.

  1. Make sure there is no Web Hooks REST API (tcWebHooks) installed.
  2. Click "Browse plugins repository" button, search "tcWebHooks"
  3. Select Web Hooks REST API (tcWebHooks) from the result
  4. Click "Get" button and install to the teamcity instance.

Your Environment

Example Configuration (xml)

fengzmgit commented 6 months ago

I found a same error, but seems have been fixed in a earlier version. https://github.com/tcplugins/tcWebHooks/issues/154

netwolfuk commented 6 months ago

Please see #236

fengzmgit commented 6 months ago

Thank you @netwolfuk . Sorry I didn't see #236 yesterday when I raised this issue.

netwolfuk commented 6 months ago

No worries. I hope to get a final release out this week and publish the update on the plugins marketplace.