ERROR - s.buildServer.agent.AgentMain2 - Failed to create Spring context

Completed

I installed a new agent on Ubuntu 18.04.1 LTS when starting the agent I get ERROR - s.buildServer.agent.AgentMain2 - Failed to create Spring context.

 

[2020-01-29 14:48:53,983] INFO - s.buildServer.agent.AgentMain2 - ===========================================================
[2020-01-29 14:48:54,356] INFO - s.buildServer.agent.AgentMain2 - TeamCity Build Agent 10.0.4 (build 42538), OS: Linux, User: root, Java: 11.0.5, OpenJDK 64-Bit Server VM (11.0.5+10-post-Ubuntu-0ubuntu1.118.04, mixed mode, sharing), OpenJDK Runtime Environment (11.0.5+10-post-Ubuntu-0ubuntu1.118.04), Private Build, JVM parameters: -ea -Xmx384m -Dteamcity_logs=../logs/ -Dlog4j.configuration=file:../conf/teamcity-agent-log4j.xml
[2020-01-29 14:48:54,357] INFO - s.buildServer.agent.AgentMain2 - Starting...
[2020-01-29 14:48:54,419] ERROR - s.buildServer.agent.AgentMain2 - Failed to create Spring context.
java.lang.NoClassDefFoundError: java/sql/SQLException
at org.springframework.core.SerializableTypeWrapper$MethodInvokeTypeProvider.getType(SerializableTypeWrapper.java:393)
at org.springframework.core.SerializableTypeWrapper.forTypeProvider(SerializableTypeWrapper.java:150)
at org.springframework.core.SerializableTypeWrapper$TypeProxyInvocationHandler.invoke(SerializableTypeWrapper.java:245)
at org.springframework.core.$Proxy4.getRawType(Unknown Source)
at org.springframework.core.ResolvableType.resolveType(ResolvableType.java:770)
at org.springframework.core.ResolvableType.resolveClass(ResolvableType.java:760)
at org.springframework.core.ResolvableType.<init>(ResolvableType.java:153)
at org.springframework.core.ResolvableType.forType(ResolvableType.java:1343)
at org.springframework.core.ResolvableType.forType(ResolvableType.java:1311)
at org.springframework.core.ResolvableType.forTypes(ResolvableType.java:1271)
at org.springframework.core.ResolvableType.getInterfaces(ResolvableType.java:463)
at org.springframework.core.ResolvableType.as(ResolvableType.java:426)
at org.springframework.core.convert.support.GenericConversionService.getRequiredTypeInfo(GenericConversionService.java:288)
at org.springframework.core.convert.support.GenericConversionService.addConverterFactory(GenericConversionService.java:119)
at org.springframework.core.convert.support.DefaultConversionService.addScalarConverters(DefaultConversionService.java:129)
at org.springframework.core.convert.support.DefaultConversionService.addDefaultConverters(DefaultConversionService.java:75)
at org.springframework.core.convert.support.DefaultConversionService.<init>(DefaultConversionService.java:62)
at org.springframework.core.env.AbstractPropertyResolver.<init>(AbstractPropertyResolver.java:41)
at org.springframework.core.env.PropertySourcesPropertyResolver.<init>(PropertySourcesPropertyResolver.java:41)
at org.springframework.core.env.AbstractEnvironment.<init>(AbstractEnvironment.java:113)
at org.springframework.core.env.StandardEnvironment.<init>(StandardEnvironment.java:54)
at org.springframework.context.support.AbstractApplicationContext.createEnvironment(AbstractApplicationContext.java:500)
at org.springframework.context.support.AbstractApplicationContext.getEnvironment(AbstractApplicationContext.java:289)
at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.resolvePath(AbstractRefreshableConfigApplicationContext.java:122)
at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.setConfigLocations(AbstractRefreshableConfigApplicationContext.java:80)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:137)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at jetbrains.buildServer.agent.AgentMain2$2.<init>(AgentMain2.java:156)
at jetbrains.buildServer.agent.AgentMain2.createRootApplicationContext(AgentMain2.java:147)
at jetbrains.buildServer.agent.AgentMain2.main2(AgentMain2.java:71)
at jetbrains.buildServer.agent.AgentMain2.main(AgentMain2.java:38)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at jetbrains.buildServer.agent.AgentMain.main(AgentMain.java:43)
Caused by: java.lang.ClassNotFoundException: java.sql.SQLException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 36 more
[2020-01-29 14:48:54,424] INFO - ent.impl.upgrade.AgentExitCode - Agent exited. Failed to initialize Spring context

 

Anyone know the cause or how to fix? 

Thanks

 


 

0
3 comments

Hi,

 

TeamCity 10 does not support Java 11. Please upgrade your teamcity installation or downgrade your java installation, but please consider that teamcity 10 has been out of support for over 2 years now.

0

Hello, I am getting this error with the official docker image, any clue about why or what can I do ?

Thanks

0

Hello Jose,

The official docker image as been recently updated, can you please try with the new version?

If it still does not work, may I suggest that you upload the full log to our secure upload service and share the id with us so that we can check what is going wrong?

Thank you,

Guilherme

0

Please sign in to leave a comment.