[ 
https://issues.apache.org/jira/browse/DIRSERVER-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16424095#comment-16424095
 ] 

Jan Kalina commented on DIRSERVER-2231:
---------------------------------------

This is problem also because this stacktrace is trashed in ExceptionInterceptor 
and replaced by LdapNoSuchObjectException:
https://github.com/apache/directory-server/blob/2.0.0-M24/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java#L164

This causes exception above produce following misleading exception:
{code}
java.lang.IllegalStateException: Unable to initialise DirectoryService

        at 
org.wildfly.security.sasl.gssapi.TestKDC.startDirectoryService(TestKDC.java:123)
        at 
org.wildfly.security.sasl.gssapi.GssapiTestSuite.startServers(GssapiTestSuite.java:51)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:508)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
        at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
        at 
com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
        at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
        at 
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: 
org.apache.directory.api.ldap.model.exception.LdapNoSuchObjectException: 
ERR_251_PARENT_NOT_FOUND Parent dc=wildfly,dc=org not found
        at 
org.apache.directory.server.core.exception.ExceptionInterceptor.add(ExceptionInterceptor.java:165)
        at 
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
        at 
org.apache.directory.server.core.admin.AdministrativePointInterceptor.add(AdministrativePointInterceptor.java:1189)
        at 
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
        at 
org.apache.directory.server.core.authz.AciAuthorizationInterceptor.add(AciAuthorizationInterceptor.java:518)
        at 
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
        at 
org.apache.directory.server.core.referral.ReferralInterceptor.add(ReferralInterceptor.java:247)
        at 
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
        at 
org.apache.directory.server.core.authn.AuthenticationInterceptor.add(AuthenticationInterceptor.java:335)
        at 
org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
        at 
org.apache.directory.server.core.normalization.NormalizationInterceptor.add(NormalizationInterceptor.java:131)
        at 
org.apache.directory.server.core.DefaultOperationManager.add(DefaultOperationManager.java:397)
        at 
org.apache.directory.server.core.shared.DefaultCoreSession.add(DefaultCoreSession.java:211)
        at 
org.apache.directory.server.core.shared.DefaultCoreSession.add(DefaultCoreSession.java:188)
        at 
org.wildfly.security.sasl.gssapi.TestKDC.startDirectoryService(TestKDC.java:104)
        ... 16 more
{code}

> NPE in AbstractBTreePartition when cacheService is not used
> -----------------------------------------------------------
>
>                 Key: DIRSERVER-2231
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-2231
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0.0-M24
>            Reporter: Jan Kalina
>            Priority: Major
>
> When trying to use DirectoryService without cacheService, following 
> NullPointerException occure:
> {code}
> java.lang.NullPointerException
> org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition.buildEntryDn(AbstractBTreePartition.java:2606)
> org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition.fetch(AbstractBTreePartition.java:1424)
> org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition.saveContextCsn(AbstractBTreePartition.java:3636)
> org.apache.directory.server.core.partition.impl.btree.AbstractBTreePartition.lookup(AbstractBTreePartition.java:1393)
> org.apache.directory.server.core.shared.partition.DefaultPartitionNexus.lookup(DefaultPartitionNexus.java:464)
> org.apache.directory.server.core.exception.ExceptionInterceptor.add(ExceptionInterceptor.java:160)
> org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
> org.apache.directory.server.core.admin.AdministrativePointInterceptor.add(AdministrativePointInterceptor.java:1189)
> org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
> org.apache.directory.server.core.authz.AciAuthorizationInterceptor.add(AciAuthorizationInterceptor.java:518)
> org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
> org.apache.directory.server.core.referral.ReferralInterceptor.add(ReferralInterceptor.java:247)
> org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
> org.apache.directory.server.core.authn.AuthenticationInterceptor.add(AuthenticationInterceptor.java:335)
> org.apache.directory.server.core.api.interceptor.BaseInterceptor.next(BaseInterceptor.java:341)
> org.apache.directory.server.core.normalization.NormalizationInterceptor.add(NormalizationInterceptor.java:131)
> org.apache.directory.server.core.DefaultOperationManager.add(DefaultOperationManager.java:397)
> org.apache.directory.server.core.shared.DefaultCoreSession.add(DefaultCoreSession.java:211)
> org.apache.directory.server.core.shared.DefaultCoreSession.add(DefaultCoreSession.java:188)
> org.wildfly.security.sasl.gssapi.TestKDC.startDirectoryService(TestKDC.java:104)
> {code}
> From source it looks null entryDnCache should be supported, as there is 
> condition for null cacheService:
> https://github.com/apache/directory-server/blob/2.0.0-M24/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java#L600



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to