Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Spring incompatibility with TeamCity 2024.07.3 #259

Open
sgaspari opened this issue Nov 21, 2024 · 0 comments
Open

[BUG] Spring incompatibility with TeamCity 2024.07.3 #259

sgaspari opened this issue Nov 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sgaspari
Copy link

sgaspari commented Nov 21, 2024

Describe the bug

After installing Checkmarx AST 2.0.24 plugin, TeamCity is reporting an error related to Spring configuration (in Administration > Server Administration > Plugins page).
After a quick analysis we saw that the plugin is embedding Spring Core 6.1.14 whereas TeamCity is running Spring Core 5.3.34.
This could explain the plugin failing to load its Spring context.

Expected behavior

Successful loading of the Checkmarx AST plugin.

Actual behavior

Presently TeamCity 2024.07.3 is unable to load the plugin (latest tested compatible version = 2.0.22).

Steps to reproduce

  1. Install TeamCity 2024.07.3
  2. Install Checkmarx AST plugin version 2.0.24
  3. Restart TeamCity server
  4. Go to Administration > Server Administration > Plugins page to see the error.

Environment

  • TEAMCITY PLUGIN version: 2.0.24
  • TeamCity server version 2024.07.3
  • Server platform: SUSE Linux Enterprise Server 11 (x86_64)
  • openjdk version "17.0.6" 2023-01-17

Additional comments

On JetBrains marketplace there is no restriction about TeamCity version compatibility range.

Logs

Failed to initialize Spring Context:
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [jar:file:/usersdev/ciq00/soft/TeamCity/webapps/ROOT/WEB-INF/lib/common-impl.jar!/META-INF/per-plugin-shared-spring.xml]; nested exception is org.springframework.beans.FatalBeanException: Class [org.springframework.context.config.ContextNamespaceHandler] for namespace [http://www.springframework.org/schema/context] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:417)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:338)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:196)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:232)
at jetbrains.buildServer.plugins.spring.SpringPluginLoader$TeamCityPluginContext.doLoadBeanDefinitions(SpringPluginLoader.java:316)
at jetbrains.buildServer.plugins.spring.SpringPluginLoader$TeamCityPluginContext.loadBeanDefinitions(SpringPluginLoader.java:302)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:95)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:679)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:562)
at jetbrains.buildServer.plugins.spring.SpringPluginLoader.pluginClassesLoaded(SpringPluginLoader.java:126)
at jdk.internal.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at jetbrains.buildServer.util.EventDispatcher.invokeListeners(EventDispatcher.java:157)
at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:136)
at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:82)
at jdk.proxy3/jdk.proxy3.$Proxy51.pluginClassesLoaded(Unknown Source)
at jetbrains.buildServer.plugins.PluginManagerImpl$5.visitPlugin(PluginManagerImpl.java:470)
at jetbrains.buildServer.plugins.PluginsCollection$1.run(PluginsCollection.java:98)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.springframework.beans.FatalBeanException: Class [org.springframework.context.config.ContextNamespaceHandler] for namespace [http://www.springframework.org/schema/context] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface
at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:132)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1386)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1371)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:179)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:149)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:96)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:511)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
... 25 more
@sgaspari sgaspari added the bug Something isn't working label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant