Re: [ApacheDS] How to setup a debugging environment

2012-06-11 Thread Garbage

 Is this an error on my side is something wrong with the files I downloaded ?
 You can't run eclipse eclipse before having built the project at least once : 
 the SNAPSHOTs aren't stored into the maven repository.
 
 Just run mvn clean install -DskpiTests first, then re-run mvn eclipse:eclipse

So i obviously got the order wrong. Now I succeeded with these commands. I set 
maven opts to the mentioned xmx setting and had to add a maxpermsize parameter, 
but this might be because of the buggy jdk I had installed (updated afterwards):

C:
cd \workspaces
md apacheds
cd apacheds
svn co 
http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies
cd trunk-with-dependencies
mvn clean install -DskipTests
(Results can be found in trunk-with-dependencies\apacheds\all\target and 
trunk-with-dependencies\apacheds\service\target)
mvn eclipse:eclipse
Then went to eclipse and chose File / Import / General / Existing Projects 
into Workspace. For root directory I chose 
C:\workspaces\apacheds\trunk-with-dependencies
 
 Now I have a snapshot M8, can I do the same for M7 ?
 

Re: [ApacheDS] How to setup a debugging environment

2012-06-11 Thread Emmanuel Lécharny

Le 6/11/12 11:58 AM, Garbage a écrit :

Is this an error on my side is something wrong with the files I downloaded ?

You can't run eclipse eclipse before having built the project at least once : 
the SNAPSHOTs aren't stored into the maven repository.

Just run mvn clean install -DskpiTests first, then re-run mvn eclipse:eclipse

So i obviously got the order wrong. Now I succeeded with these commands. I set 
maven opts to the mentioned xmx setting and had to add a maxpermsize parameter, 
but this might be because of the buggy jdk I had installed (updated afterwards):

C:
cd \workspaces
md apacheds
cd apacheds
svn co 
http://svn.apache.org/repos/asf/directory/apacheds/trunk-with-dependencies
cd trunk-with-dependencies
mvn clean install -DskipTests
(Results can be found in trunk-with-dependencies\apacheds\all\target and 
trunk-with-dependencies\apacheds\service\target)
mvn eclipse:eclipse
Then went to eclipse and chose File / Import / General / Existing Projects into 
Workspace. For root directory I chose C:\workspaces\apacheds\trunk-with-dependencies

  Now I have a snapshot M8, can I do the same for M7 ?


yes, of course. M7 is available in a tag : 
http://svn.apache.org/viewvc/directory/apacheds/tags/2.0.0-M7/


You just have to build apacheds in this case, as M7 is depending on 
released components of Shared, so just build the server with mvn 
eclipse:eclipse, it should be enough (the dependencies are all in the 
maven repository)




--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com



Re: [ApacheDS] how can a partition return more than one result ?

2012-06-11 Thread Garbage


Von meinem iPad gesendet


 But I am only able to return ONE entry, I didn't find or understand the 
 concept how MULTIPLE entries can be returned. Can someone show me the right 
 direction ?
 The idea is to use a Cursor that maps around the partition and fetch the 
 entries one by one.
 
 The way the server works is that based on your filter, you select the right 
 index to use to fetch the entries. There are may possibilities here :
 - first, you may have to do a full scan (the filter is not selective enough, 
 for instance). In this case, you don't use any index, you just use the 
 MasterTable to get the entries. Now, for each entry you fetch, you'll have to 
 filter them to see if it's a valid entry - or not.
 - or you can select an index. You will fetch the index elements, and for each 
 of them, fetch the associated entry.  Once done, you can check against the 
 filter if the entry is valid - or not
 
 In any case, the cursor is your friend here : it maps the next() operation on 
 top of your index.
 
 Now, if your Partition is a Btree, it's easier, as the AbstractBTreePartition 
 class already handles everyting for you. If you don't inherit from this 
 Abstract class, then it's way more complicated. I'll suggest you have a look 
 at the AbstractBTreePartition to get a clue about how we process a search 
 over a BTree based partition.
If I got you right I am to create my own cursor object which retrieves and 
stores the array with the items I want to deliver. The cursor then implements 
the next and get method in order to send the array one by one. But where is the 
cursor being called ? 
I tried to base my own partition on the abstract btree partition but what am I 
supposed to return from getRootId and getDefaultId and even worse from 
convertAndInit ?

Sorry for the beginner level questions but ApacheDS is quite complex and new to 
me.

Java keystone issues in 2.0.0-M7

2012-06-11 Thread Cody Herriges
I am pretty close to a fully functional set of puppet modules to set up 
ApacheDS with one hitch, ApacheDS fails to start when using my own keystore.  I 
get the following error '[20:51:35] ERROR 
[org.apache.directory.server.ApacheDsService] - Cannot start the server : 
ERR_683 Failed to create a SSL context.'  You will see below the values of 
ads-keystoreFile and ads-certificatePassword.  After the ldif you will find the 
print out of a -list from keytool.  I haven't seen anything in the 
configuration schemas to indicate that I have forgotten something.  Ideas?

dn: ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
ads-transports: ldap
ads-transports: ldaps
ads-serverid: ldapServer
ads-searchbasedn: ou=users,ou=system
ads-replreqhandler: 
org.apache.directory.server.ldap.replication.provider.SyncReplRequestHandler
ads-enabled: TRUE
ads-saslprincipal: ldap/ldap.example@example.com
ads-saslrealms: example.com
ads-saslrealms: apache.org
objectclass: ads-server
objectclass: ads-ldapServer
objectclass: ads-dsBasedServer
objectclass: ads-base
objectclass: top
ads-saslmechhandlers: CRAM-MD5
ads-saslmechhandlers: DIGEST-MD5
ads-saslmechhandlers: GSS-SPNEGO
ads-saslmechhandlers: GSSAPI
ads-saslmechhandlers: NTLM
ads-saslmechhandlers: SIMPLE
ads-confidentialityrequired: FALSE
ads-maxsizelimit: 1000
ads-maxtimelimit: 15000
ads-extendedophandlers: gracefulShutdownHandler
ads-extendedophandlers: starttlshandler
ads-extendedophandlers: storedprochandler
ads-saslhost: ldap.dc1.puppetlabs.net
ads-keystoreFile: /etc/apacheds/apacheds.jks
ads-certificatePassword: password

==

keytool -list -keystore /etc/apacheds/apacheds.jks -storepass password

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 3 entries

startcom_certification_authority, Jun 11, 2012, trustedCertEntry,
Certificate fingerprint (MD5): 22:4D:8F:8A:FC:F7:35:C2:BB:57:34:90:7B:8B:22:16
startssl_sub.class1.server.ca, Jun 11, 2012, trustedCertEntry,
Certificate fingerprint (MD5): 30:B0:5A:F7:B2:F4:BE:0C:28:67:15:EA:CC:5B:24:20
yellow.dc1.puppetlabs.net, Jun 11, 2012, PrivateKeyEntry, 
Certificate fingerprint (MD5): C3:CF:0E:DC:61:D6:F0:4C:54:E3:D7:F2:BE:DF:E0:BD


--
Cody Herriges
Operations Engineer - Puppet Labs
pgp key: 0x5DB77142 @ pgp.mit.edu








Re: Java keystone issues in 2.0.0-M7

2012-06-11 Thread Cody Herriges
Never mind.  Miss configured keystore.  Issue solved.

--
Cody Herriges
Operations Engineer - Puppet Labs
pgp key: 0x5DB77142 @ pgp.mit.edu