Thanks Alex, it went very fine. Now by modifying the Manifest file, it is working fine. Thanks again for your time.
-----Original Message----- From: Alex Karasulu [mailto:[EMAIL PROTECTED] On Behalf Of Alex Karasulu Sent: 28 November 2006 14:33 To: Apache Directory Developers List Subject: Re: problem with new schema and dump afterwards in APACHEDS Emmanuel Lecharny wrote: > > > On 11/28/06, *Seshu Kumar* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Hi Emmanuel, > > Thanks for the info. Here I am just putting all the steps I > followed and please correct me, if any mistakes in the procedure - > Thanks. > > - now tried to dump the data using command, > > java -jar apacheds-tools.jar dump -i "C:\apacheds-1.0.0" -p onrelay -f dump.ldif > > > What about : > > > java -classpath > C:\apacheds-1.0.0\lib\preference-schema-1.0-SNAPSHOT.jar > -jar apacheds-tools.jar dump -i "C:\apacheds-1.0.0" -p onrelay -f dump.ldif > This will not work unfortunately :(. It's my fault. Basically the tools jar is an executable jar which has a bunch of classpath crud statically bound in it's manifest. If you give the CP on the command line then you override the CP in the manifest I think. So this executable jar is not using the class loader infrastructure built into the daemon bootstrappers which puts all jars in the lib/ directory on the bootclasspath. This is stupid on my part because it should so dropping the jar into lib should make it get picked up. This is a big problem because it will not enable us to use add on jars without supplying the whole darn classpath on the command line with the new jar. This is just for this tools project. So we need to make a fix to this. Long term solutions ------------------- By long term I mean a quick 1.0.1 release. 1). Use the daemon bootstrapper infrastructure to start the tools just the way the server is started. (the main bootstrapper would be used instead of JSvc or Procrun bootstrappers). 2). Copy the code in the main bootstrapper (superclass) that creates the classloader and use that in the main code. I prefer #1. Short term workaround --------------------- Unjar the tools jar in a temp directory. Add your jar to the list of jars on the classpath (DO NOT FORGET A SPACE AT START AND END OF LINE) in the extracted manifest file. Jar up the tools jar supplying the edited manifest file. Overwrite the old tools jar with new one. This time the command without any classpath should work. Here's what your manifest should look like: Manifest-Version: 1.0 Main-Class: org.apache.directory.server.tools.ApachedsTools Class-Path: logger.jar daemon.jar bootstrapper.jar ../lib/antlr-2.7.6.jar ../lib/apacheds-kerberos-shared-1.0.1-SNAPSHOT.jar ../lib/apacheds-protocol-changepw-1.0.1-SNAPSHOT.jar ../lib/apacheds-protocol-shared-1.0.1-SNAPSHOT.jar ../lib/apacheds-protocol-kerberos-1.0.1-SNAPSHOT.jar ../lib/apacheds-protocol-ldap-1.0.1-SNAPSHOT.jar ../lib/apacheds-protocol-ntp-1.0.1-SNAPSHOT.jar ../lib/apacheds-core-1.0.1-SNAPSHOT.jar ../lib/apacheds-core-shared-1.0.1-SNAPSHOT.jar ../lib/apacheds-server-jndi-1.0.1-SNAPSHOT.jar ../lib/apacheds-server-main-1.0.1-SNAPSHOT.jar ../lib/shared-asn1-codec-0.9.5.3.jar ../lib/shared-asn1-0.9.5.3.jar ../lib/shared-ldap-0.9.5.3.jar ../lib/mina-core-1.0.0.jar ../lib/mina-filter-ssl-1.0.0.jar ../lib/commons-collections-3.2.jar ../lib/commons-lang-2.1.jar ../lib/commons-logging-1.0.4.jar ../lib/commons-cli-1.0.jar ../lib/jdbm-1.0.jar ../lib/lcrypto-jdk14-131.jar ../lib/oro-2.0.8.jar ../lib/spring-beans-1.2.8.jar ../lib/spring-context-1.2.8.jar ../lib/spring-core-1.2.8.jar ../lib/preference-schema-1.0-SNAPSHOT.jar Specification-Title: apacheds-tools Specification-Version: 1.0 Notice the last jar is your jar added to the classpath. Again make sure there is a space on each new line before the .. and after the .jar at the end of the line. I have had nasty problems in the past where some jars are not picked up because of this extra space. If this does not work just add all these jars, your jar and the tools.jar to your classpath and start up this class: org.apache.directory.server.tools.ApachedsTools That should work as well. Good luck, Alex
