Symptoms
TeamCity server refuses to start with no traces on the starting scripts or the TeamCity-based logs, but the following error can be found in the Catalina log files:
Handler error
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:569)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:502)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:311)
at java.util.logging.LogManager$3.run(LogManager.java:399)
at java.util.logging.LogManager$3.run(LogManager.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:396)
at java.util.logging.LogManager.access$800(LogManager.java:145)
at java.util.logging.LogManager$2.run(LogManager.java:345)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:338)
at java.util.logging.LogManager.getLogManager(LogManager.java:378)
at java.util.logging.Logger.demandLogger(Logger.java:448)
at java.util.logging.Logger.getLogger(Logger.java:502)
at org.apache.juli.logging.DirectJDKLog.<init>(DirectJDKLog.java:61)
at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:181)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:133)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:156)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:211)
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:52)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.util.calendar.ZoneInfoFile
at sun.util.calendar.ZoneInfo.getTimeZone(ZoneInfo.java:589)
at java.util.TimeZone.getTimeZone(TimeZone.java:560)
at java.util.TimeZone.setDefaultZone(TimeZone.java:666)
at java.util.TimeZone.getDefaultRef(TimeZone.java:636)
at java.util.TimeZone.getDefault(TimeZone.java:625)
at java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:657)
at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:601)
at org.apache.juli.DateFormatCache$Cache.<init>(DateFormatCache.java:124)
at org.apache.juli.DateFormatCache$Cache.<init>(DateFormatCache.java:101)
at org.apache.juli.DateFormatCache.<init>(DateFormatCache.java:90)
at org.apache.juli.OneLineFormatter.setTimeFormat(OneLineFormatter.java:102)
at org.apache.juli.OneLineFormatter.<init>(OneLineFormatter.java:73)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at java.util.logging.LogManager.getFormatterProperty(LogManager.java:1551)
at java.util.logging.StreamHandler.configure(StreamHandler.java:89)
at java.util.logging.StreamHandler.<init>(StreamHandler.java:107)
at java.util.logging.ConsoleHandler.<init>(ConsoleHandler.java:98)
... 24 more
Cause
TeamCity relies on the JVM to work. In some instances, it can fail to load the time data, which is critical for Tomcat to work correctly, so it crashes out. Because the issue is on Tomcat, it never reaches the TeamCity code to write in the TeamCity-specific logs.
This can often be caused by an outdated or corrupted JVM.
Resolution
Upgrading the JVM to a newer version addresses the problem. As of 2025, it is recommended to use Java 21 for all modern versions of TeamCity. Please note that upgrading TeamCity doesn't upgrade the Java it uses.
Comments
0 comments
Please sign in to leave a comment.