0 Replies Latest reply on Feb 19, 2018 10:47 AM by Ben Rowland

    IllegalAccessError (class name corrupted?)

    Ben Rowland

      We are seeing an unusual IllegalAccessError intermittently in our application.  It appears to be related to sun.util.calendar.Gregorian but the top line of the error looks like something is causing the java stack to be corrupted at run time.

       

      The reason I'm asking in the JVM forum is this appears to be a run-time issue I don't believe should ever happen.  Our application is deployed as a JAR which does not change, but this issue only occurs sometimes and is pretty hard to reproduce in a development environment.  Is it possible the stack could be getting corrupted somehow?  It seems unlikely that any application or library classes could interfere with the Oracle JDK classes at runtime, even while using custom class loaders (as these are loaded by the boot class loader).

       

      We're using Java 1.8.0_31 on Solaris 10.  Could this be a JVM bug?  We intend to retry on a more recent update but we want to gather more facts before causing more issues in our live services.

       

      Note the class name before the .<init> on the first line appears to be corrupted (we've also seen cases where this class name appears as legitimate symbols within the java process such as defaultFailureUrl or CLIENT_ID):

       

      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)

       

      Any suggestions or insights very much appreciated!

       

      Thanks,

       

      Ben