I'm currently trying to chase down a bug in SymmetricEncryption, and find that I can't run the unit test in Eclipse.

The first problem is that the path for creating a temporary key isn't valid,

String tmpKeyPath = new File(this.getClass().getClassLoader().getResource(".").getFile(), "lsc-key.tmp").getAbsolutePath();

In my configuration, this path becomes

/home/rgarner/workspace/lsc-core/file:/usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar!/lsc-key.tmp

which of course doesn't work. I can see the intent of the code as it stands, but is there perhaps a better way to do it that will work with eclipse ?


If I work around this issue, the next error is:

Feb 14 13:47:43 - ERROR - ! /home/rgarner/workspace/lsc-core/etc/lsc.xml.isFile() Feb 14 13:47:43 - ERROR - ! new File(lscConfigurationPath, PROPERTIES_FILENAME).isFile() Feb 14 13:47:43 - ERROR - Defined configuration location (/home/rgarner/workspace/lsc-core/etc) points to a non existing LSC configured instance. LSC configuration loading will fail !

evidently when unit tests are run from maven, there's a setup task that provides configuration. Would it be possible to add an @Before[Class] method to provide missing setup if needed ? Or are there some jvm parameters to add ? If so, where is the configuration done - I'm having trouble chasing this down through the maven config.

BTW, the underlying error I'm chasing down is an NPE in SecurityUtilsTest - LscConfiguration.getSecurity() returns null, because it's not configured ? Or because the config doesn't parse correctly ? Not sure.

Thanks,
Robin
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-dev mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-dev

Reply via email to