java.lang.ExceptionInInitializerError

JIRA | Nicolas Filotto | 2 years ago
  1. 0

    I can't build ws/stable/2.3.x with Oracle java >= 1.7.0_25. There isn't any problem with Oracle java 1.7.0_21. We face the same issues as those described in WS-290 but also the next ones: {noformat} Tests in error: testParseClasses2(org.exoplatform.services.rest.ext.groovy.ExtendedClassLoaderTest) testParseClassWithDependency(org.exoplatform.services.rest.ext.groovy.ExtendedClassLoaderTest): Could not initialize class groovyjarjarantlr.Utils testParseClasses(org.exoplatform.services.rest.ext.groovy.ExtendedClassLoaderTest): Could not initialize class groovyjarjarantlr.Utils testPerRequest(org.exoplatform.services.rest.ext.groovy.GroovySimpleTest): Could not initialize class groovyjarjarantlr.Utils testSingleton(org.exoplatform.services.rest.ext.groovy.GroovySimpleTest): Could not initialize class groovyjarjarantlr.Utils testExoComponentPerRequest(org.exoplatform.services.rest.ext.groovy.GroovyExoComponentTest): Could not initialize class groovyjarjarantlr.Utils testExoComponentSingleton(org.exoplatform.services.rest.ext.groovy.GroovyExoComponentTest): Could not initialize class groovyjarjarantlr.Utils testPerRequest(org.exoplatform.services.rest.ext.groovy.GroovyContextParamTest): Could not initialize class groovyjarjarantlr.Utils testReadSystemPropertyFail(org.exoplatform.services.rest.ext.groovy.GroovySecureRestrictionTest): Could not initialize class groovyjarjarantlr.Utils testDependency(org.exoplatform.services.rest.ext.groovy.GroovyDependenciesTest): Could not initialize class groovyjarjarantlr.Utils {noformat} Example inside ExtendedClassLoaderTest {noformat} testParseClasses2(org.exoplatform.services.rest.ext.groovy.ExtendedClassLoaderTest) Time elapsed: 0.776 sec <<< ERROR! java.lang.ExceptionInInitializerError at groovyjarjarantlr.CharScanner.setTokenObjectClass(CharScanner.java:335) at groovyjarjarantlr.CharScanner.<init>(CharScanner.java:49) at org.codehaus.groovy.antlr.UnicodeEscapingReader$DummyLexer.<init>(UnicodeEscapingReader.java:47) at org.codehaus.groovy.antlr.UnicodeEscapingReader$DummyLexer.<init>(UnicodeEscapingReader.java:47) at org.codehaus.groovy.antlr.UnicodeEscapingReader.<init>(UnicodeEscapingReader.java:69) at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:120) at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:108) at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:236) at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:161) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:846) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:550) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:526) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:503) at org.exoplatform.services.rest.ext.groovy.ExtendedGroovyClassLoader.doParseClasses(ExtendedGroovyClassLoader.java:244) at org.exoplatform.services.rest.ext.groovy.ExtendedGroovyClassLoader.parseClasses(ExtendedGroovyClassLoader.java:230) at org.exoplatform.services.rest.ext.groovy.ExtendedClassLoaderTest.testParseClasses2(ExtendedClassLoaderTest.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "ANTLR_DO_NOT_EXIT" "read") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372) at java.security.AccessController.checkPermission(AccessController.java:559) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at org.exoplatform.commons.test.TestSecurityManager.checkPermission(TestSecurityManager.java:67) at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1298) at java.lang.System.getProperty(System.java:744) at groovyjarjarantlr.Utils.<clinit>(Utils.java:7) {noformat}

    JIRA | 2 years ago | Nicolas Filotto
    java.lang.ExceptionInInitializerError
  2. 0

    I can't build ws/stable/2.3.x with Oracle java >= 1.7.0_25. There isn't any problem with Oracle java 1.7.0_21. We face the same issues as those described in WS-290 but also the next ones: {noformat} Tests in error: testParseClasses2(org.exoplatform.services.rest.ext.groovy.ExtendedClassLoaderTest) testParseClassWithDependency(org.exoplatform.services.rest.ext.groovy.ExtendedClassLoaderTest): Could not initialize class groovyjarjarantlr.Utils testParseClasses(org.exoplatform.services.rest.ext.groovy.ExtendedClassLoaderTest): Could not initialize class groovyjarjarantlr.Utils testPerRequest(org.exoplatform.services.rest.ext.groovy.GroovySimpleTest): Could not initialize class groovyjarjarantlr.Utils testSingleton(org.exoplatform.services.rest.ext.groovy.GroovySimpleTest): Could not initialize class groovyjarjarantlr.Utils testExoComponentPerRequest(org.exoplatform.services.rest.ext.groovy.GroovyExoComponentTest): Could not initialize class groovyjarjarantlr.Utils testExoComponentSingleton(org.exoplatform.services.rest.ext.groovy.GroovyExoComponentTest): Could not initialize class groovyjarjarantlr.Utils testPerRequest(org.exoplatform.services.rest.ext.groovy.GroovyContextParamTest): Could not initialize class groovyjarjarantlr.Utils testReadSystemPropertyFail(org.exoplatform.services.rest.ext.groovy.GroovySecureRestrictionTest): Could not initialize class groovyjarjarantlr.Utils testDependency(org.exoplatform.services.rest.ext.groovy.GroovyDependenciesTest): Could not initialize class groovyjarjarantlr.Utils {noformat} Example inside ExtendedClassLoaderTest {noformat} testParseClasses2(org.exoplatform.services.rest.ext.groovy.ExtendedClassLoaderTest) Time elapsed: 0.776 sec <<< ERROR! java.lang.ExceptionInInitializerError at groovyjarjarantlr.CharScanner.setTokenObjectClass(CharScanner.java:335) at groovyjarjarantlr.CharScanner.<init>(CharScanner.java:49) at org.codehaus.groovy.antlr.UnicodeEscapingReader$DummyLexer.<init>(UnicodeEscapingReader.java:47) at org.codehaus.groovy.antlr.UnicodeEscapingReader$DummyLexer.<init>(UnicodeEscapingReader.java:47) at org.codehaus.groovy.antlr.UnicodeEscapingReader.<init>(UnicodeEscapingReader.java:69) at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:120) at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:108) at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:236) at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:161) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:846) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:550) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:526) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:503) at org.exoplatform.services.rest.ext.groovy.ExtendedGroovyClassLoader.doParseClasses(ExtendedGroovyClassLoader.java:244) at org.exoplatform.services.rest.ext.groovy.ExtendedGroovyClassLoader.parseClasses(ExtendedGroovyClassLoader.java:230) at org.exoplatform.services.rest.ext.groovy.ExtendedClassLoaderTest.testParseClasses2(ExtendedClassLoaderTest.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "ANTLR_DO_NOT_EXIT" "read") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372) at java.security.AccessController.checkPermission(AccessController.java:559) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at org.exoplatform.commons.test.TestSecurityManager.checkPermission(TestSecurityManager.java:67) at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1298) at java.lang.System.getProperty(System.java:744) at groovyjarjarantlr.Utils.<clinit>(Utils.java:7) {noformat}

    JIRA | 2 years ago | Nicolas Filotto
    java.lang.ExceptionInInitializerError
  3. 0

    Swagger support for the Google App Engine (GAE)?

    GitHub | 2 years ago | edouardmercier
    java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.reflect.generics.reflectiveObjects")
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    AccessControlException using swagger extension with GAE Edition

    GitHub | 2 years ago | komasoftware
    java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.reflect.generics.reflectiveObjects")
  6. 0

    Pathfinding + spawning L&S creatures + unload chunks == boom!

    GitHub | 2 years ago | Cervator
    java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.reflect")

    25 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.security.AccessControlException

      access denied ("java.util.PropertyPermission" "ANTLR_DO_NOT_EXIT" "read")

      at java.security.AccessControlContext.checkPermission()
    2. Java RT
      SecurityManager.checkPermission
      1. java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
      2. java.security.AccessController.checkPermission(AccessController.java:559)
      3. java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
      3 frames
    3. org.exoplatform.commons
      TestSecurityManager.checkPermission
      1. org.exoplatform.commons.test.TestSecurityManager.checkPermission(TestSecurityManager.java:67)
      1 frame
    4. Java RT
      System.getProperty
      1. java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1298)
      2. java.lang.System.getProperty(System.java:744)
      2 frames
    5. Groovy
      Utils.<clinit>
      1. groovyjarjarantlr.Utils.<clinit>(Utils.java:7)
      1 frame