Upgrade Java Version

Answered

Since upgrading to the latest version of on-premise TeamCity (installed on Windows Server), I am seeing the following warning:

Deprecated java used

This TeamCity server is using a deprecated version of Java (8). Please upgrade to Java 11 as future versions of TeamCity will be incompatible with Java 8.
Note: at the moment TeamCity does not support Java versions > 11.
 
Has anyone done this? Is there a step-by-step how-to document which someone can point me to?
 
Thanks in advance.
0
4 comments
Hello,
You can follow this article on Java Installation , where you find information on how to install and configure Java properly. 
 
Please let me know if you have any questions or concerns.
 
Guilherme
0

The article was helpful, thank you Guilherme. The TeamCity Server service is now using Amazon Corretto 11 and seems to be working well.

I tried to also upgrade a Build Agent, but this was not successful. I replaced the contents of the BIN and LIB folders, in the agent's JRE folder. After doing this, the agent service started and immediately stopped again. The error is as follows:

ERROR - s.buildServer.agent.AgentMain2 - Failed to create Spring context.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'buildAgent' defined in URL [jar:file:/C:/TeamCity/buildAgent1/lib/agent.jar!/META-INF/buildAgentSpring.xml]: Unsatisfied dependency expressed through constructor parameter 5; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'serverCommunicationProtocolResolver' defined in URL [jar:file:/C:/TeamCity/buildAgent1/lib/agent.jar!/META-INF/buildAgentSpring.xml]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jetbrains.buildServer.agent.impl.serverCommunication.PollingProtocol#0' defined in URL [jar:file:/C:/TeamCity/buildAgent1/lib/agent.jar!/META-INF/buildAgentSpring.xml]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jetbrains.buildServer.agent.impl.serverCommunication.ServerCommandsPoller#0' defined in URL [jar:file:/C:/TeamCity/buildAgent1/lib/agent.jar!/META-INF/buildAgentSpring.xml]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverApi' defined in URL [jar:file:/C:/TeamCity/buildAgent1/lib/agent.jar!/META-INF/buildAgentSpring.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [jetbrains.buildServer.http.HttpApi]: Factory method 'create' threw exception; nested exception is java.lang.ExceptionInInitializerError

Is there another document somewhere that explains how to upgrade the Java version used by build agents?

Thanks for the help.

0

Hello!

Regarding the upgrade of the build agent's java, please check the following guides:

https://www.jetbrains.com/help/teamcity/configure-java-for-agent.html

https://www.jetbrains.com/help/teamcity/configure-java-for-agent.html#Upgrading+Java+on+Agents

Please let me know if you were able to make it work or if you need further help.

Thank you,

Guilherme

0

In the end, my solution was much more brutal than that. I'd been planning to migrate our TC instance to a new server for a while, so what I did was install a brand new TC instance on that server, using the latest release, and then restore from the original server over the top of that. This, of course, resolve the old Java version issue.

No further help needed, and thanks for the response.

Phil

0

Please sign in to leave a comment.