Issue Details (XML | Word | Printable)

Key: DIRSERVER-603
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ersin Er
Reporter: Jörg Henne
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Exception adding prescriptiveACI subentry from examples

Created: 24/Mar/06 08:27 PM   Updated: 15/Feb/09 01:34 PM
Return to search
Component/s: ldap
Affects Version/s: 1.0-RC1
Fix Version/s: 1.0-RC4

Time Tracking:
Not Specified

Environment: DS 1.0-RC1

Resolution Date: 16/Aug/06 09:16 PM


 Description  « Hide
If one tries to run the prescriptive ACI example from the documentation at
http://directory.apache.org/subprojects/apacheds/docs/users/enablesearchforallusers.html
the server barfs with the following message:

[13:23:58] WARN [org.apache.directory.server.core.authz.TupleCache] - ACIItem parser failure on 'null'. Cannnot add ACITuples to TupleCache.
java.text.ParseException: Parser failure on ACIItem:
{ identificationTag "enableSearchForAllUsers", precedence 14, authenticationLevel simple, itemOrUserFirst userFirst: {
    userClasses { allUsers }, userPermissions {
       {
         protectedItems {entry, allUserAttributeTypesAndValues},
         grantsAndDenials { grantRead, grantReturnDN, grantBrowse }
       }
    }
  } }
Antlr exception trace:
unexpected char: 0x0A
at org.apache.directory.shared.ldap.aci.ACIItemParser.parse(ACIItemParser.java:118)
at org.apache.directory.server.core.authz.TupleCache.subentryAdded(TupleCache.java:166)
at org.apache.directory.server.core.authz.AuthorizationService.add(AuthorizationService.java:348)
at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.add(InterceptorChain.java:1175)
at org.apache.directory.server.core.referral.ReferralService.add(ReferralService.java:256)
at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.add(InterceptorChain.java:1175)
at org.apache.directory.server.core.authn.AuthenticationService.add(AuthenticationService.java:192)
at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.add(InterceptorChain.java:1175)
at org.apache.directory.server.core.normalization.NormalizationService.add(NormalizationService.java:89)
at org.apache.directory.server.core.interceptor.InterceptorChain.add(InterceptorChain.java:700)
at org.apache.directory.server.core.partition.DirectoryPartitionNexusProxy.add(DirectoryPartitionNexusProxy.java:308)
at org.apache.directory.server.core.partition.DirectoryPartitionNexusProxy.add(DirectoryPartitionNexusProxy.java:296)
at org.apache.directory.server.core.jndi.ServerDirContext.createSubcontext(ServerDirContext.java:351)
at org.apache.directory.server.core.jndi.ServerDirContext.createSubcontext(ServerDirContext.java:319)
at javax.naming.directory.InitialDirContext.createSubcontext(InitialDirContext.java:178)
at org.apache.directory.server.ldap.support.AddHandler.messageReceived(AddHandler.java:75)
at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(DemuxingIoHandler.java:128)
at org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler.messageReceived(LdapProtocolProvider.java:431)
at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(AbstractIoFilterChain.java:189)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:494)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:52)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:761)
at org.apache.mina.filter.LoggingFilter.messageReceived(LoggingFilter.java:87)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:494)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:52)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:761)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:91)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:494)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:52)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:761)
at org.apache.mina.filter.ThreadPoolFilter.processEvent(ThreadPoolFilter.java:665)
at org.apache.mina.filter.ThreadPoolFilter$Worker.processEvents(ThreadPoolFilter.java:421)
at org.apache.mina.filter.ThreadPoolFilter$Worker.run(ThreadPoolFilter.java:376)

If all \n characters are removed from the example like this:

subentry
        .put(
            "prescriptiveACI",
            "{"
                + " identificationTag \"enableSearchForAllUsers\","
                + " precedence 14,"
                + " authenticationLevel simple,"
                + " itemOrUserFirst userFirst: "
                + " { "
                + " userClasses { allUsers }, "
                + " userPermissions "
                + " { "
                + " { "
                + " protectedItems {entry, allUserAttributeTypesAndValues}, "
                + " grantsAndDenials { grantRead, grantReturnDN, grantBrowse } "
                + " } } } }");

the example works as expected.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alex Karasulu added a comment - 24/Mar/06 10:25 PM
Jorg,

Please use the DIRAPACHEDS JIRA rather than DIR. DIRAPACHEDS is for apacheds. DIR is for general issues not relating to any particular project at Apache Directory like the website and PMC related issues.

Thanks,
Alex

Alex Karasulu added a comment - 24/Mar/06 10:27 PM
This seems like a parser issue. I'd have to test this to be certain.

Alex Karasulu added a comment - 08/Aug/06 03:45 AM
Ersin could you have a look at this when you have a chance.

Ersin Er added a comment - 16/Aug/06 08:38 PM
Should have been fixed with http://svn.apache.org/viewvc?view=rev&revision=432027

But I would like to get a feedback from Jorg in order to close this issue.

Ersin Er added a comment - 16/Aug/06 09:16 PM
Fixed in 1.0-trunks and in 1.1-truks : revision 432027 & 432035.

Jörg Henne added a comment - 17/Aug/06 01:44 PM
Looks great!

Emmanuel Lecharny added a comment - 15/Feb/09 01:34 PM
closed