You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2006/08/08 05:25:16 UTC

svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/

Author: akarasulu
Date: Mon Aug  7 20:25:15 2006
New Revision: 429554

URL: http://svn.apache.org/viewvc?rev=429554&view=rev
Log:
Fix for DIRSERVER-673: Can not query schema

Modified:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/SearchTest.java

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java?rev=429554&r1=429553&r2=429554&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java Mon Aug  7 20:25:15 2006
@@ -50,7 +50,8 @@
 public class ExceptionService extends BaseInterceptor
 {
     private PartitionNexus nexus;
-
+    private LdapDN subschemSubentryDn;
+    
     /**
      * The OIDs normalizer map
      */
@@ -68,6 +69,9 @@
     {
         nexus = factoryCfg.getPartitionNexus();
         normalizerMap = factoryCfg.getGlobalRegistries().getAttributeTypeRegistry().getNormalizerMapping();
+        Attribute attr = nexus.getRootDSE().get( "subschemaSubentry" );
+        subschemSubentryDn = new LdapDN( ( String ) attr.get() );
+        subschemSubentryDn.normalize( normalizerMap );
     }
 
 
@@ -372,8 +376,7 @@
             return nextInterceptor.search( base, env, filter, searchCtls );
         }
 
-        Attribute attr = nextInterceptor.getRootDSE().get( "subschemaSubentry" );
-        if ( ( ( String ) attr.get() ).equalsIgnoreCase( base.toString() ) )
+        if ( ( subschemSubentryDn.toNormName() ).equalsIgnoreCase( base.toNormName() ) )
         {
             return nextInterceptor.search( base, env, filter, searchCtls );
         }

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=429554&r1=429553&r2=429554&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java Mon Aug  7 20:25:15 2006
@@ -111,7 +111,7 @@
     /**
      * subschemaSubentry attribute's value from Root DSE
      */
-    private String subschemaSubentryDn;
+    private LdapDN subschemaSubentryDn;
 
     /**
      * The time when the server started up.
@@ -147,7 +147,8 @@
 
         // stuff for dealing with subentries (garbage for now)
         String subschemaSubentry = ( String ) nexus.getRootDSE().get( "subschemaSubentry" ).get();
-        subschemaSubentryDn = new LdapDN( subschemaSubentry ).toString().toLowerCase();
+        subschemaSubentryDn = new LdapDN( subschemaSubentry );
+        subschemaSubentryDn.normalize( globalRegistries.getAttributeTypeRegistry().getNormalizerMapping() );
     }
 
 
@@ -187,7 +188,7 @@
         SearchControls searchCtls ) throws NamingException
     {
         // check to make sure the DN searched for is a subentry
-        if ( !subschemaSubentryDn.equals( base.toString() ) )
+        if ( !subschemaSubentryDn.toNormName().equals( base.toNormName() ) )
         {
             NamingEnumeration e = nextInterceptor.search( base, env, filter, searchCtls );
             if ( searchCtls.getReturningAttributes() != null )
@@ -203,7 +204,8 @@
         {
             SimpleNode node = ( SimpleNode ) filter;
 
-            if ( node.getAttribute().equalsIgnoreCase( "objectClass" )
+            // see if node attribute is objectClass
+            if ( node.getAttribute().equalsIgnoreCase( "2.5.4.0" )
                 && node.getValue().equalsIgnoreCase( "subschema" ) && node.getAssertionType() == SimpleNode.EQUALITY )
             {
                 // call.setBypass( true );
@@ -216,7 +218,8 @@
         {
             PresenceNode node = ( PresenceNode ) filter;
 
-            if ( node.getAttribute().equalsIgnoreCase( "objectClass" ) )
+            // see if node attribute is objectClass
+            if ( node.getAttribute().equalsIgnoreCase( "2.5.4.0" ) )
             {
                 // call.setBypass( true );
                 Attributes attrs = getSubschemaEntry( searchCtls.getReturningAttributes() );

Modified: directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/SearchTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/SearchTest.java?rev=429554&r1=429553&r2=429554&view=diff
==============================================================================
--- directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/SearchTest.java (original)
+++ directory/trunks/apacheds/server-unit/src/test/java/org/apache/directory/server/SearchTest.java Mon Aug  7 20:25:15 2006
@@ -374,4 +374,20 @@
         results = search( "(&(sn=Bush)(numberOfOctaves=4))" );
         assertEquals( "returned size of results", 0, results.size() );
     }
+    
+    
+    public void testSearchSchema() throws Exception
+    {
+        SearchControls controls = new SearchControls();
+        controls.setSearchScope( SearchControls.OBJECT_SCOPE );
+        controls.setReturningAttributes( new String[] { "objectClasses" } );
+        
+        NamingEnumeration results = ctx.search( "cn=schema", "objectClass=subschema", controls );
+        assertTrue( results.hasMore() );
+        SearchResult result = ( SearchResult ) results.next();
+        assertNotNull( result );
+        assertFalse( results.hasMore() );
+        assertNotNull( result.getAttributes().get( "objectClasses" ) );
+        assertEquals( 1, result.getAttributes().size() );
+    }
 }



Re: svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/

Posted by Alex Karasulu <ao...@bellsouth.net>.
Jörg Henne wrote:
> Thanks. I tried to run the tests. Some failed with an error message 
> which doesn't seem to be related to my changes:

Eeeeewww looks like NT file locking while trying to delete files from 
old test runs.

Alex


> java.io.IOException: Unable to delete file: 
> server-work\system\objectClass.lg
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1087)
>        at 
> org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
>        at 
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1079)
>        at 
> org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
>        at 
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
>        at 
> org.apache.directory.server.core.unit.AbstractTestCase.doDelete(AbstractTestCase.java:216) 
> 
>        at 
> org.apache.directory.server.core.unit.AbstractTestCase.setUp(AbstractTestCase.java:202) 
> 
>        at junit.framework.TestCase.runBare(TestCase.java:125)
>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>        at junit.framework.TestResult.run(TestResult.java:109)
>        at junit.framework.TestCase.run(TestCase.java:118)
>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>        at junit.framework.TestSuite.run(TestSuite.java:203)
>        at 
> jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
>        at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135) 
> 
>        at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122) 
> 
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>        at 
> jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:261) 
> 
>        at 
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:781) 
> 
> 
> I haven't had time to dig a bit deeper, though.
> 
> Joerg Henne
> 


Re: svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/

Posted by Trustin Lee <tr...@gmail.com>.
Please send an empty message to dev-unsubscribe@directory.apache.org, and
confirm the unsubscription.

HTH,
Trustin

On 8/9/06, Wiström, Magnus <Ma...@consignit.se> wrote:
>
> Hi,
>
> How do I unsubscribe to this mailinglist?
>
> /Magnus
>
> ________________________________
>
> Från: Alex Karasulu [mailto:aok123@bellsouth.net]
> Skickat: ti 2006-08-08 23:26
> Till: Apache Directory Developers List
> Ämne: Re: svn commit: r429554 - in /directory/trunks/apacheds:
> core/src/main/java/org/apache/directory/server/core/exception/
> core/src/main/java/org/apache/directory/server/core/schema/
> server-unit/src/test/java/org/apache/directory/server/
>
>
>
> Jörg Henne wrote:
> > Thanks. I tried to run the tests. Some failed with an error message
> > which doesn't seem to be related to my changes:
>
> Eeeeewww looks like NT file locking while trying to delete files from
> old test runs.
>
> Alex
>
>
> > java.io.IOException: Unable to delete file:
> > server-work\system\objectClass.lg
> >        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java
> :1087)
> >        at
> > org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
> >        at
> > org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
> >        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java
> :1079)
> >        at
> > org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
> >        at
> > org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
> >        at
> > org.apache.directory.server.core.unit.AbstractTestCase.doDelete(
> AbstractTestCase.java:216)
> >
> >        at
> > org.apache.directory.server.core.unit.AbstractTestCase.setUp(
> AbstractTestCase.java:202)
> >
> >        at junit.framework.TestCase.runBare(TestCase.java:125)
> >        at junit.framework.TestResult$1.protect(TestResult.java:106)
> >        at junit.framework.TestResult.runProtected(TestResult.java:124)
> >        at junit.framework.TestResult.run(TestResult.java:109)
> >        at junit.framework.TestCase.run(TestCase.java:118)
> >        at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >        at junit.framework.TestSuite.run(TestSuite.java:203)
> >        at
> > jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[
> Ljava.lang.Object;)Ljava.lang.Object;(Unknown
> > Source)
> >        at
> > java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object
> ;I)Ljava.lang.Object;(Unknown
> > Source)
> >        at
> > org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java
> :210)
> >        at
> >
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(
> AbstractDirectoryTestSuite.java:135)
> >
> >        at
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> AbstractDirectoryTestSuite.java:122)
> >
> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> >        at
> > jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[
> Ljava.lang.Object;)Ljava.lang.Object;(Unknown
> > Source)
> >        at
> > java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object
> ;I)Ljava.lang.Object;(Unknown
> > Source)
> >        at
> > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> SurefireBooter.java:261)
> >
> >        at
> > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java
> :781)
> >
> >
> > I haven't had time to dig a bit deeper, though.
> >
> > Joerg Henne
> >
>
>
>
>
>


-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

SV: svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/

Posted by Wiström, Magnus <Ma...@consignit.se>.
Hi,
 
How do I unsubscribe to this mailinglist?
 
/Magnus

________________________________

Från: Alex Karasulu [mailto:aok123@bellsouth.net]
Skickat: ti 2006-08-08 23:26
Till: Apache Directory Developers List
Ämne: Re: svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/



Jörg Henne wrote:
> Thanks. I tried to run the tests. Some failed with an error message
> which doesn't seem to be related to my changes:

Eeeeewww looks like NT file locking while trying to delete files from
old test runs.

Alex


> java.io.IOException: Unable to delete file:
> server-work\system\objectClass.lg
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1087)
>        at
> org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
>        at
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1079)
>        at
> org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
>        at
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
>        at
> org.apache.directory.server.core.unit.AbstractTestCase.doDelete(AbstractTestCase.java:216)
>
>        at
> org.apache.directory.server.core.unit.AbstractTestCase.setUp(AbstractTestCase.java:202)
>
>        at junit.framework.TestCase.runBare(TestCase.java:125)
>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>        at junit.framework.TestResult.run(TestResult.java:109)
>        at junit.framework.TestCase.run(TestCase.java:118)
>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>        at junit.framework.TestSuite.run(TestSuite.java:203)
>        at
> jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown
> Source)
>        at
> java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown
> Source)
>        at
> org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
>
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
>
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>        at
> jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown
> Source)
>        at
> java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown
> Source)
>        at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:261)
>
>        at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:781)
>
>
> I haven't had time to dig a bit deeper, though.
>
> Joerg Henne
>




Re: svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/

Posted by Alex Karasulu <ao...@bellsouth.net>.
Jörg Henne wrote:
> Thanks. I tried to run the tests. Some failed with an error message 
> which doesn't seem to be related to my changes:

Eeeeewww looks like NT file locking while trying to delete files from 
old test runs.

Alex


> java.io.IOException: Unable to delete file: 
> server-work\system\objectClass.lg
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1087)
>        at 
> org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
>        at 
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1079)
>        at 
> org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
>        at 
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
>        at 
> org.apache.directory.server.core.unit.AbstractTestCase.doDelete(AbstractTestCase.java:216) 
> 
>        at 
> org.apache.directory.server.core.unit.AbstractTestCase.setUp(AbstractTestCase.java:202) 
> 
>        at junit.framework.TestCase.runBare(TestCase.java:125)
>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>        at junit.framework.TestResult.run(TestResult.java:109)
>        at junit.framework.TestCase.run(TestCase.java:118)
>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>        at junit.framework.TestSuite.run(TestSuite.java:203)
>        at 
> jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
>        at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135) 
> 
>        at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122) 
> 
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>        at 
> jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:261) 
> 
>        at 
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:781) 
> 
> 
> I haven't had time to dig a bit deeper, though.
> 
> Joerg Henne
> 


Re: svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/

Posted by Alex Karasulu <ao...@bellsouth.net>.
Jörg Henne wrote:
> Thanks. I tried to run the tests. Some failed with an error message 
> which doesn't seem to be related to my changes:

Eeeeewww looks like NT file locking while trying to delete files from 
old test runs.

Alex


> java.io.IOException: Unable to delete file: 
> server-work\system\objectClass.lg
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1087)
>        at 
> org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
>        at 
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
>        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1079)
>        at 
> org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
>        at 
> org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
>        at 
> org.apache.directory.server.core.unit.AbstractTestCase.doDelete(AbstractTestCase.java:216) 
> 
>        at 
> org.apache.directory.server.core.unit.AbstractTestCase.setUp(AbstractTestCase.java:202) 
> 
>        at junit.framework.TestCase.runBare(TestCase.java:125)
>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>        at junit.framework.TestResult.run(TestResult.java:109)
>        at junit.framework.TestCase.run(TestCase.java:118)
>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>        at junit.framework.TestSuite.run(TestSuite.java:203)
>        at 
> jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
>        at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135) 
> 
>        at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122) 
> 
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>        at 
> jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown 
> Source)
>        at 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:261) 
> 
>        at 
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:781) 
> 
> 
> I haven't had time to dig a bit deeper, though.
> 
> Joerg Henne
> 


Re: svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/

Posted by Jörg Henne <j....@levigo.de>.
Alex Karasulu schrieb:
> Jörg Henne wrote:
>> Alex Karasulu schrieb:
>>>
>>> Hmmmm the exception service checks with the backend to see if an 
>>> entry exists in it.  Basically we need to tell it not to do this for 
>>> the schemaSubentry since it is a special virtual entry.  I'll have 
>>> to look at the patch to see how you did this.  Did the integration 
>>> tests pass when you ran them after making this change?
>> I let SchemaService override hasEntry(). I did not try the 
>> integration test, though. How do I do that again?
>
> Try running this at the top level apacheds directory to run these tests:
>
> mvn -Dintegration test
Thanks. I tried to run the tests. Some failed with an error message 
which doesn't seem to be related to my changes:

java.io.IOException: Unable to delete file: 
server-work\system\objectClass.lg
        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1087)
        at 
org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
        at 
org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
        at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1079)
        at 
org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:811)
        at 
org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:777)
        at 
org.apache.directory.server.core.unit.AbstractTestCase.doDelete(AbstractTestCase.java:216)
        at 
org.apache.directory.server.core.unit.AbstractTestCase.setUp(AbstractTestCase.java:202)
        at junit.framework.TestCase.runBare(TestCase.java:125)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at 
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown 
Source)
        at 
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown 
Source)
        at 
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:210)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:135)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:122)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
        at 
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown 
Source)
        at 
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown 
Source)
        at 
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:261)
        at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:781)

I haven't had time to dig a bit deeper, though.

Joerg Henne

Re: svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/

Posted by Alex Karasulu <ao...@bellsouth.net>.
Jörg Henne wrote:
> Alex Karasulu schrieb:
>>
>> Hmmmm the exception service checks with the backend to see if an entry 
>> exists in it.  Basically we need to tell it not to do this for the 
>> schemaSubentry since it is a special virtual entry.  I'll have to look 
>> at the patch to see how you did this.  Did the integration tests pass 
>> when you ran them after making this change?
> I let SchemaService override hasEntry(). I did not try the integration 
> test, though. How do I do that again?

Try running this at the top level apacheds directory to run these tests:

mvn -Dintegration test


>>> - I stored the subschemaSubentry LdapDN in its normalized form, which 
>>> allowed me to compare the two LdapDNs simply with .equals(). This 
>>> saves a few string concatenations with the corresponding garbage. 
>>> This may not amount to much, but I've seen the quoted idiom quite a 
>>> few times and all such optimizations might really add up.
>>
>> Right good thinking!  I thought I did this too.  That way you don't 
>> have to normalize every time.  Basically the interceptor builds the 
>> normalized LdapDN for the schema subentry in the init() method.
>>
>> NOTE: the toNormaName() maintains a cached String of the normalized 
>> name in the LdapDN.
> Sorry, I missed that one. This way the comparison is efficient, of course.

NP at all.

Alex


Re: svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/

Posted by Jörg Henne <j....@levigo.de>.
Alex Karasulu schrieb:
>
> Hmmmm the exception service checks with the backend to see if an entry 
> exists in it.  Basically we need to tell it not to do this for the 
> schemaSubentry since it is a special virtual entry.  I'll have to look 
> at the patch to see how you did this.  Did the integration tests pass 
> when you ran them after making this change?
I let SchemaService override hasEntry(). I did not try the integration 
test, though. How do I do that again?
>> - I stored the subschemaSubentry LdapDN in its normalized form, which 
>> allowed me to compare the two LdapDNs simply with .equals(). This 
>> saves a few string concatenations with the corresponding garbage. 
>> This may not amount to much, but I've seen the quoted idiom quite a 
>> few times and all such optimizations might really add up.
>
> Right good thinking!  I thought I did this too.  That way you don't 
> have to normalize every time.  Basically the interceptor builds the 
> normalized LdapDN for the schema subentry in the init() method.
>
> NOTE: the toNormaName() maintains a cached String of the normalized 
> name in the LdapDN.
Sorry, I missed that one. This way the comparison is efficient, of course.

Joerg Henne

Re: svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/

Posted by Alex Karasulu <ao...@bellsouth.net>.
Jörg Henne wrote:
> Hi,
> 
> akarasulu@apache.org wrote:
>> +        if ( ( subschemSubentryDn.toNormName() ).equalsIgnoreCase( 
>> base.toNormName() ) )
> 
> one of the issues I reported 
> (http://issues.apache.org/jira/browse/DIRSERVER-694) was a dupe (sorry!) 
> to the one you fixed. The patch I provided in two points, however:

Ahhh you provided a patch.  Sorry man I totally missed it because of the 
dup.  Don't worry tho we got this one nipped anyways :).

> - I relieved the ExceptionService from having to know the 
> subschemaSubentry DN which I think is nicer, because it opens up the 
> option of serving more "out-of-band" stuff like the subschemaSubentry 
> without needing to touch the ExceptionService every time.

Hmmmm the exception service checks with the backend to see if an entry 
exists in it.  Basically we need to tell it not to do this for the 
schemaSubentry since it is a special virtual entry.  I'll have to look 
at the patch to see how you did this.  Did the integration tests pass 
when you ran them after making this change?

> - I stored the subschemaSubentry LdapDN in its normalized form, which 
> allowed me to compare the two LdapDNs simply with .equals(). This saves 
> a few string concatenations with the corresponding garbage. This may not 
> amount to much, but I've seen the quoted idiom quite a few times and all 
> such optimizations might really add up.

Right good thinking!  I thought I did this too.  That way you don't have 
to normalize every time.  Basically the interceptor builds the 
normalized LdapDN for the schema subentry in the init() method.

NOTE: the toNormaName() maintains a cached String of the normalized name 
in the LdapDN.

Alex


Re: svn commit: r429554 - in /directory/trunks/apacheds: core/src/main/java/org/apache/directory/server/core/exception/ core/src/main/java/org/apache/directory/server/core/schema/ server-unit/src/test/java/org/apache/directory/server/

Posted by Jörg Henne <j....@levigo.de>.
Hi,

akarasulu@apache.org wrote:
> +        if ( ( subschemSubentryDn.toNormName() ).equalsIgnoreCase( base.toNormName() ) )

one of the issues I reported 
(http://issues.apache.org/jira/browse/DIRSERVER-694) was a dupe (sorry!) 
to the one you fixed. The patch I provided in two points, however:

- I relieved the ExceptionService from having to know the 
subschemaSubentry DN which I think is nicer, because it opens up the 
option of serving more "out-of-band" stuff like the subschemaSubentry 
without needing to touch the ExceptionService every time.

- I stored the subschemaSubentry LdapDN in its normalized form, which 
allowed me to compare the two LdapDNs simply with .equals(). This saves 
a few string concatenations with the corresponding garbage. This may not 
amount to much, but I've seen the quoted idiom quite a few times and all 
such optimizations might really add up.

Joerg Henne