Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10942

Make Testing Sling Mock Oak compatible with Java14+, Update to Oak 1.40.0

    XMLWordPrintableJSON

Details

    Description

      Currently org.apache.sling.testing.sling-mock-oak still depends on an old Oak version (1.16.0) which is not compatible with Java14 or above.
      The reason is https://issues.apache.org/jira/browse/OAK-7358 and an error like this can be observed in the log

      java.lang.NoClassDefFoundError: java/security/acl/Group
      	at org.apache.jackrabbit.oak.security.user.UserConfigurationImpl.getUserPrincipalProvider(UserConfigurationImpl.java:245)
      	at org.apache.jackrabbit.oak.security.principal.PrincipalConfigurationImpl.getPrincipalProvider(PrincipalConfigurationImpl.java:75)
      	at org.apache.jackrabbit.oak.spi.security.principal.CompositePrincipalConfiguration.getPrincipalProvider(CompositePrincipalConfiguration.java:55)
      	at org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule.getPrincipalProvider(AbstractLoginModule.java:454)
      	at org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule.getPrincipals(AbstractLoginModule.java:490)
      	at org.apache.jackrabbit.oak.security.authentication.user.LoginModuleImpl.commit(LoginModuleImpl.java:167)
      	at java.base/javax.security.auth.login.LoginContext.invoke(LoginContext.java:737)
      	at java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:672)
      	at java.base/javax.security.auth.login.LoginContext$4.run(LoginContext.java:670)
      	at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
      	at java.base/javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:670)
      	at java.base/javax.security.auth.login.LoginContext.login(LoginContext.java:581)
      	at org.apache.jackrabbit.oak.core.ContentRepositoryImpl.login(ContentRepositoryImpl.java:163)
      	at org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:288)
      	at org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:226)
      	at org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository.login(OakMockSlingRepository.java:123)
      	at org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository.loginAdministrative(OakMockSlingRepository.java:139)
      	at org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.registerJcrNodeTypes(ResourceResolverFactoryInitializer.java:235)
      	at org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.setUp(ResourceResolverFactoryInitializer.java:69)
      	at org.apache.sling.testing.mock.sling.MockSling.newResourceResolverFactory(MockSling.java:87)
      	at ...
      Caused by: java.lang.ClassNotFoundException: java.security.acl.Group
      	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
      	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
      	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
      	... 49 more
      
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h
                  4h