Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 86166 invoked from network); 8 Dec 2007 18:58:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Dec 2007 18:58:00 -0000 Received: (qmail 12679 invoked by uid 500); 8 Dec 2007 18:57:49 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 12473 invoked by uid 500); 8 Dec 2007 18:57:48 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 12462 invoked by uid 99); 8 Dec 2007 18:57:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Dec 2007 10:57:48 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of akarasulu@gmail.com designates 209.85.146.178 as permitted sender) Received: from [209.85.146.178] (HELO wa-out-1112.google.com) (209.85.146.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Dec 2007 18:57:28 +0000 Received: by wa-out-1112.google.com with SMTP id m38so2403848waf for ; Sat, 08 Dec 2007 10:57:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; bh=+66rlZAMKEOD/R8b9j+cPmXRJBoVj8/DyRdc88X1fJo=; b=Xdz1DyN72v+sSzWYix9wfKuJL8j+oD0RQSd1F2XPFx8klyEuh+H31kOwxQTQ+tEi/GOMxYtCCbmW8okffLyT6a60xTyVLI2bCqu+fvhU3I2T/dJYrgwCzBmBqQzaNZ1LT5HsZ0niJOsDeDmrcuXjK3jco4Rz5pRQJgpWL3umZPI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=qkawOvwi2bybUvENnCXxOLEw4dljoamG8kqVvRup03bQwATXJY4cHSMviB8zr00MrJf3cCr5FhTsGvipxs060zRokrPxW9zT8cJvfHI0vokIlcy/v7HJaw+7XQtuoongsJCNTvNyZ4Y4SPCdDnwDrBw50Kq00YH8xPtJ/slMimA= Received: by 10.114.94.1 with SMTP id r1mr4651401wab.1197140251579; Sat, 08 Dec 2007 10:57:31 -0800 (PST) Received: by 10.115.18.12 with HTTP; Sat, 8 Dec 2007 10:57:31 -0800 (PST) Message-ID: Date: Sat, 8 Dec 2007 13:57:31 -0500 From: "Alex Karasulu" Sender: akarasulu@gmail.com To: "Apache Directory Developers List" Subject: Re: [ApacheDS] Getting odd exceptions when trying to revert changes in stored procedure tests In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_15614_13775240.1197140251574" References: X-Google-Sender-Auth: c5d6988863b2246e X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_15614_13775240.1197140251574 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Here's a quick hint on how to isolate it really quickly: Just use a test in core-integ like SubentryServiceForTriggersIT.testEntryAdd() delete the marked, "cn=marked,ou=configuration" entry. I already did this but I @Ignore the test class so you might want to remove that annotation up at the top. Run this test and you'll see the exception encountered when running the test. We should be able to delete entries that are in the trigger specific area so I would suspect this is a bug. Thanks, Alex On Dec 8, 2007 1:49 PM, Ersin Er wrote: > > > On Dec 8, 2007 10:47 AM, Alex Karasulu wrote: > > > Ersin, > > > > I am trying to get reverts working with SP code. There are some tricky > > things here however these are different points. What I need to know from > > you is why I get this stack trace here when trying to revert the changes of > > this test: > > > > SubentryServiceForTriggersIT.testEntryAdd() > > > > Here's the tail end of the trace: > > > > Caused by: java.lang.StringIndexOutOfBoundsException: String index out > > of range: -1 > > at java.lang.String.substring (String.java:1938) > > at > > org.apache.directory.server.core.sp.StoredProcUtils.extractStoredProcUnitName > > (StoredProcUtils.java:47) > > at > > org.apache.directory.server.core.sp.StoredProcExecutionManager.findStoredProcUnit( > > StoredProcExecutionManager.java:76) > > at > > org.apache.directory.server.core.trigger.TriggerInterceptor.executeProcedure > > (TriggerInterceptor.java:591) > > at > > org.apache.directory.server.core.trigger.TriggerInterceptor.executeTrigger( > > TriggerInterceptor.java:578) > > at > > org.apache.directory.server.core.trigger.TriggerInterceptor.executeTriggers > > (TriggerInterceptor.java:558) > > at > > org.apache.directory.server.core.trigger.TriggerInterceptor.delete ( > > TriggerInterceptor.java:310) > > at > > org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.delete > > (InterceptorChain.java:1134) > > ... 60 more > > > > The problem seems to stem from trying to extract the class name from > > this spec: " LogUtils.logDelete". Looks like this code tries to get the > > name of the class by finding the index of a ':' colon instead of a '.' - > > Why is that? > > > Because that's the SP syntax. Fully Qualified Stored Procedure Name = > Stored Procedure Unit : Stored Procedure > > I'll try to look further into the pb. > > > > > Here's the LDIF operation that causes this exception: > > > > Entry : cn=marked,ou=configuration,ou=system > > Change type is DELETE > > > > > > > > Alex > > > > > -- > Ersin Er ------=_Part_15614_13775240.1197140251574 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Here's a quick hint on how to isolate it really quickly:

Just use a test in core-integ like SubentryServiceForTriggersIT.testEntryAdd() delete the marked, "cn=marked,ou=configuration" entry.  I already did this but I @Ignore the test class so you might want to remove that annotation up at the top.  Run this test and you'll see the exception encountered when running the test.

We should be able to delete entries that are in the trigger specific area so I would suspect this is a bug.

Thanks,
Alex

On Dec 8, 2007 1:49 PM, Ersin Er < ersin.er@gmail.com> wrote:


On Dec 8, 2007 10:47 AM, Alex Karasulu <akarasulu@apache.org> wrote:
Ersin,

I am trying to get reverts working with SP code.  There are some tricky things here however these are different points.  What I need to know from you is why I get this stack trace here when trying to revert the changes of this test:

SubentryServiceForTriggersIT.testEntryAdd()

Here's the tail end of the trace:

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring (String.java:1938)
    at org.apache.directory.server.core.sp.StoredProcUtils.extractStoredProcUnitName(StoredProcUtils.java:47)
    at org.apache.directory.server.core.sp.StoredProcExecutionManager.findStoredProcUnit (StoredProcExecutionManager.java:76)
    at org.apache.directory.server.core.trigger.TriggerInterceptor.executeProcedure(TriggerInterceptor.java:591)
    at org.apache.directory.server.core.trigger.TriggerInterceptor.executeTrigger (TriggerInterceptor.java:578)
    at org.apache.directory.server.core.trigger.TriggerInterceptor.executeTriggers(TriggerInterceptor.java:558)
    at org.apache.directory.server.core.trigger.TriggerInterceptor.delete (TriggerInterceptor.java:310)
    at org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.delete(InterceptorChain.java:1134)
    ... 60 more

The problem seems to stem from trying to extract the class name from this spec: " LogUtils.logDelete".  Looks like this code tries to get the name of the class by finding the index of a ':' colon instead of a '.'  -  Why is that?

Because that's the SP syntax.  Fully Qualified Stored Procedure Name = Stored Procedure Unit : Stored Procedure

I'll try to look further into the pb.

Here's the LDIF operation that causes this exception:

   Entry : cn=marked,ou=configuration,ou=system
    Change type is DELETE



Alex



--
Ersin Er

------=_Part_15614_13775240.1197140251574--