Just a suggestion, try adding:

maven.junit.fork=true

to your project.properties.

Doug

Adam Perry-Pelletier wrote:

I'm converting an opensource project to use maven.  The is a java COM
wrapper.  Accordingly, it relies on underlying JNI and dlls for the native
support.  When running its JUnit tests, I get the following error.



Testcase:
testEnv(com.moesol.bindings.platform_sdk.base_services.ProcessTest):Ca

used an ERROR

Native Library C:\Program Files\USMC\CJB\com_moesol_bindings.dll already
loaded

in another classloader

java.lang.UnsatisfiedLinkError: Native Library C:\Program Files\CJB\com_moe

sol_bindings.dll already loaded in another classloader

       at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1551)

       at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1482)

       at java.lang.Runtime.load0(Runtime.java:737)

       at java.lang.System.load(System.java:811)

       at
com.moesol.bindings.NativeLibraryLoader.load(NativeLibraryLoader.java



The native library is getting loaded multiple times by the class loader.  We
have static blocks that load the libraries for every test.  This does work
under ant, presumably because ant fully unloads each test case after it is
tested, thus the dlls aren't loaded more than once.



Can anyone provide guidance on how to work around this.



Thanks,

Adam



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to