Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4450

LdapLoginModuleTestCase does not run when run in the Turkish Locale

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.2.Final (EAP)
    • 7.1.1.Final
    • Security
    • None

      I'm trying to run the tests as described in AS7-4301, and there is a problem in the LdapLoginModuleTestCase. When attempting to start up the DefaultDirectoryService as part of the server setup tasks gives the following problem

      java.lang.IllegalStateException: Something has got to be severely wrong with the core packaging
      or the build to have resulted in this exception.
              at org.apache.directory.server.core.DefaultDirectoryService.<init>(DefaultDirectoryService.java:357)
              at org.jboss.as.test.integration.security.common.LDAPServerSetupTask.setup(LDAPServerSetupTask.java:118)
              at org.jboss.as.arquillian.container.ServerSetupObserver.handleBeforeDeployment(ServerSetupObserver.java:84)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
              at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
              at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:150)
              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:123)
              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:266)
              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:122)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
              at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
              at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
              at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
              at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
              at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:90)
              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:79)
              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:258)
              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:234)
              at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:78)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
              at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
              at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
              at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
              at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
              at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
              at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
              at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
              at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
              at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:80)
              at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:182)
              at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
              at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
              at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
              at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
              at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
              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:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              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: javax.naming.NamingException [Root exception is javax.naming.directory.NoSuchAttributeException: OID for name 'ditContentRules' was not found within the OID registry]
              at org.apache.directory.server.core.DefaultDirectoryService.<init>(DefaultDirectoryService.java:355)
              ... 105 more
      Caused by: javax.naming.directory.NoSuchAttributeException: OID for name 'ditContentRules' was not found within the OID registry
              at org.apache.directory.server.schema.registries.DefaultOidRegistry.getOid(DefaultOidRegistry.java:146)
              at org.apache.directory.server.schema.registries.DefaultAttributeTypeRegistry.lookup(DefaultAttributeTypeRegistry.java:186)
              at org.apache.directory.server.schema.bootstrap.AbstractBootstrapProducer$BootstrapObjectClass.getMayList(AbstractBootstrapProducer.java:583)
              at org.apache.directory.server.schema.registries.DefaultRegistries.resolve(DefaultRegistries.java:447)
              at org.apache.directory.server.schema.registries.DefaultRegistries.resolve(DefaultRegistries.java:440)
              at org.apache.directory.server.schema.registries.DefaultRegistries.checkRefInteg(DefaultRegistries.java:191)
              at org.apache.directory.server.core.DefaultDirectoryService.<init>(DefaultDirectoryService.java:351)
              ... 105 more
      

      Looking at DefaultOidRegistry it does a String.toLowerCase() without passing in Locale.ENGLISH:

              -- SNIP --
              String lowerCase = name.trim().toLowerCase();
              
              String oid = byName.get( lowerCase );
              
              if ( oid != null )
              {
                  if ( IS_DEBUG )
                  {
                      LOG.debug( "looked up OID '{}' with id '{}'", oid, name );
                  }
      
                  return oid;
              }
      
              NamingException fault = new NoSuchAttributeException( "OID for name '" + name + "' was not "
                  + "found within the OID registry" );
              LOG.warn( fault.getMessage() );
              throw fault;
          }
      

      There seems to be an entry with that name in 'byName' so it is most likely an encoding issue.

              josef.cacek@gmail.com Josef Cacek (Inactive)
              kkhan1@redhat.com Kabir Khan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: