编辑:在堆栈跟踪的顶部,类名称异常可能很重要。我已经更新了堆栈跟踪,以提供一个我们见过的奇怪类名的更明显的例子,以强调这一点。通常,完全限定的类名应该在.<init>
之前。
在处理某些入站请求时,我们在Spring Boot微服务中看到以下错误。它是间歇性的 - 仅在偶尔重启时发生,并且仅在我们的数据中心的Solaris机箱上发生(无法在开发机器上重现)。
这在添加一些新功能后开始出现;但是我们不相信这个新功能包括我们认为可能会导致Gregorian等问题的任何事情。特别是这些是JDK核心类。
我们在Solaris 10上使用Spring Boot 1.5.4.RELEASE和Java 1.8.0_31。
java.lang.IllegalAccessError: tried to access method p>G^L.<init>(Ljava/util/TimeZone;)V from class sun.util.calendar.Gregorian
at sun.util.calendar.Gregorian.newCalendarDate(Gregorian.java:85)
at java.util.GregorianCalendar.<init>(GregorianCalendar.java:738)
at java.util.Calendar$Builder.build(Calendar.java:1482)
at sun.util.locale.provider.CalendarProviderImpl.getInstance(CalendarProviderImpl.java:88)
at java.util.Calendar.createCalendar(Calendar.java:1666)
at java.util.Calendar.getInstance(Calendar.java:1655)
at java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:657)
at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:601)
at org.apache.catalina.valves.AbstractAccessLogValve$DateFormatCache$Cache.<init>(AbstractAccessLogValve.java:251)
at org.apache.catalina.valves.AbstractAccessLogValve$DateFormatCache$Cache.<init>(AbstractAccessLogValve.java:237)
at org.apache.catalina.valves.AbstractAccessLogValve$DateFormatCache$Cache.<init>(AbstractAccessLogValve.java:233)
at org.apache.catalina.valves.AbstractAccessLogValve$DateFormatCache$Cache.<init>(AbstractAccessLogValve.java:207)
at org.apache.catalina.valves.AbstractAccessLogValve$DateFormatCache.<init>(AbstractAccessLogValve.java:347)
at org.apache.catalina.valves.AbstractAccessLogValve$1.initialValue(AbstractAccessLogValve.java:392)
at org.apache.catalina.valves.AbstractAccessLogValve$1.initialValue(AbstractAccessLogValve.java:389)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
at java.lang.ThreadLocal.get(ThreadLocal.java:170)
at org.apache.catalina.valves.AbstractAccessLogValve$DateAndTimeElement.addElement(AbstractAccessLogValve.java:1015)
at org.apache.catalina.valves.AbstractAccessLogValve.log(AbstractAccessLogValve.java:653)
at org.apache.catalina.core.AccessLogAdapter.log(AccessLogAdapter.java:48)
at org.apache.catalina.core.ContainerBase.logAccess(ContainerBase.java:1065)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:401)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)