|
I still see the same problem when using Novell/OpenLDAP client library. I have attached a small class with a main method and a copy of the library for testing purposes.
This is using apacheds-main-0.9.2-SNAPSHOT.jar of 09-Aug-2005 12:41 (MD5sum = c9142905fe1f1aaa38ce29088a45fc09). I added a new method to the test cases (class org.apache.ldap.server.jndi.ModifyContextTest) which checks my problem. With Alex changes it disappeard. But I am not sure how characteristic the methods in ModifyContextTest really are. Do they also check the partition implementation?
The test succeeds now. But as Ugo described above the top object class still vanishes if someone tries (I observed the same problem). Therfore, the test case is not good enough ... This is getting tricky. In order to resolve the confusion I created a JUnit Testcase which uses JNDI to connect to the Directory Server via LDAP and demonstrates the error situation. This is probably easier to use/integrate than the LDIF and the JLDAP tests above.
With the current version of apacheds-main-0.9.2-SNAPSHOT.jar, two of the three tests fail. Especially the situation, Ugo described above (top missing after modification), is shown. I checked the test case with another LDAP implementation (Sun) -- all three tests ran as expected. In order to run the tests, a valid jndi.properties is needed. My configuration was: --- java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory java.naming.provider.url=ldap://localhost:10389/ou=system java.naming.security.principal=uid=admin,ou=system java.naming.security.credentials=***** java.naming.security.authentication=simple --- I hope this helps. Let's reopen this even though the problem has morphed into something else. Personally I think it has exposed other issues. Also note this is all starting to reveal itself do to fixes I made to the semantic behavoir of the LockableAttributesImpl.put(Attribute) method which was incorrectly not replacing the entry. I think we now are seeing places where this was used incorrrectly to make up for the lack of correct operation. We just need to keep fixing things as they arise.
Ok I think I've nipped this one in the bud once and for all. I committed some changes to the apache ber provider which incorrectly used the LockableAttributesImpl.put methods to add objectClass attrbitute values on add operations. I have committed your test case stefan in revision 231287 here:
http://svn.apache.org/viewcvs.cgi?rev=231287&view=rev Let me know how this latest fix works out. If the issue morphs into something else we can open a separate JIRA issue. This issue is way too loaded :). Thanks guys for all your help both you Stefan and Ugo for finding and contributing the test cases. This bug has been fixed two weeks ago. I successfully retested the case in the current version, hence I close the issue.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
http://svn.apache.org/viewcvs.cgi?rev=231186&view=rev
Problem is gone now in 0.9.2-SNAPSHOT.