Bug #174

Update sample for 1.2

Added by Jonathan Clarke 6 months ago. Updated 3 months ago.

Status:Closed Start:11/02/2010
Priority:Normal Due date:
Assigned to:Rémy-Christophe Schermesser % Done:

100%

Category:Sample
Target version:1.2.0
Problem in version:

Description

Since a lot of changes have happened in 1.2, the sample no longer works out of the box. Before releasing, we must update it so it just works.

I've started on this already, and we have :
  • A script to load a CSV file into a HSQLDB database on disk (not in memory)
  • A working configuration directory (lsc.properties, logging, iBatis sql maps)
  • Some instructions (to be completed): http://lsc-project.org/wiki/documentation/1.2/sample
  • A much cleaner sample directory :)
What remains to be done:
  1. Write a script or something to launch OpenDS, so that the synchronization works
  2. Test the scenario completely
  3. Finish the instructions

Any ideas on the first point?

lsc.bat (1.9 KB) Jonathan Clarke, 11/03/2010 21:17


Related issues

related to Bug #180: Startup script is bash-specific and won't run on Windows without Cygwin Closed 12/03/2010

Associated revisions

Revision 657
Added by Jonathan Clarke 5 months ago

Sample from trunk. References #174

Revision 661
Added by Jonathan Clarke 5 months ago

Various updates to get the sample working. Includes a lib dir in sample dir, a tests JAR, a simple LDIF file for the sample. Fixes #174.

Revision 664
Added by Jonathan Clarke 5 months ago

Merge commit 661 to trunk (Various updates to get the sample working. Includes a lib dir in sample dir, a tests JAR, a simple LDIF file for the sample. Fixes #174.)

Revision 673
Added by Jonathan Clarke 5 months ago

Correct various problems in the bash scripts and make them compatible with cygwin. Fixes #174.

History

Updated by Jonathan Clarke 5 months ago

  • Status changed from Assigned to Feedback
  • % Done changed from 70 to 100

I've finished working on this.

To launch the OpenDS directory, I used the maven-jar-plugin to generate a JAR of our test code (that's where the classes to embed OpenDS are), and configured maven-assembly-plugin to put it in the distribution directory. The shell script sample/bin/lsc-sample runs the org.lsc.opends.LdapServer class.

I also moved some JARs to a special lib dir: sample/lib. This includes HSQLDB and OpenDS, as well as the lsc-tests JAR.

I have updated the doc at http://lsc-project.org/wiki/documentation/1.2/sample.

This works for me, but I would really like feedback from others! Can you test please?

Updated by Rémy-Christophe Schermesser 5 months ago

I tested the sample on windows with cygwin) but I does not work as expected.
The java program on windows take pathes with \ but the sample generate pathes with /.

Updated by Rémy-Christophe Schermesser 5 months ago

I tested the .bat that Jonathan gave me (http://lsc.pastebin.com/QD3Ui5Lv). It still does not work :

  • The program only check if JAVA_HOME is declared and does not test if java.exe is already in the path
  • Le logs are written in a hidden directory (c:\Documents and Settings\USER\Local Settings\Temp\lsc.log)
  • The program does not find the class Launcher

I will try to fix the .bat but I am no shell/windows expert

Updated by Jonathan Clarke 5 months ago

Rémy-Christophe Schermesser wrote:

I tested the .bat that Jonathan gave me (http://lsc.pastebin.com/QD3Ui5Lv). It still does not work :

  • The program only check if JAVA_HOME is declared and does not test if java.exe is already in the path
  • Le logs are written in a hidden directory (c:Documents and SettingsUSERLocal SettingsTemplsc.log)
  • The program does not find the class Launcher

I will try to fix the .bat but I am no shell/windows expert

Here is a new version which addresses the first point.

The temp directory is hidden by default on Windows, but I don't see much alternative to this. The point of using a temp directory is that the file won't be in the way, and will be removed automatically. If a user wants to access the log file, he can change the path quite easily...

Can you test again and let us know if it works now? Thanks!

Updated by Jonathan Clarke 5 months ago

  • Status changed from Feedback to Assigned

Issues with the Windows-specific .bat files are now in issue #180, to avoid mixing things up.

Leaving this issue open for now, since I would like the bash files to work in Cygwin - I'm working on a workaround.

Updated by Jonathan Clarke 5 months ago

  • Status changed from Assigned to Feedback
  • Assigned to changed from Jonathan Clarke to Rémy-Christophe Schermesser
Workaround commited. This now works on Cygwin:
  • The bin/lsc has been tested and works OK
  • The sample/bin/lsc-sample has mostly been tested, and probably works OK

Waiting for feedback to close the issue completely, but we should be OK.

Updated by Jonathan Clarke 3 months ago

  • Status changed from Feedback to Closed

The sample is now up to date and functional for 1.2.

However, it does not currently work on Windows. See #215.

Also available in: Atom PDF