Page 1 of 1

Native Library X already loaded in another classloader

Posted: Mon Dec 04, 2006 8:25 pm
by nachtkinder
I'm working on a project that uses extension jar files to retrieve additional content from a Documentum docbase. These jars reference a dll on the system that provides the connection to the docbase in a similar way to how a database driver might offer connection to a database.

I had gotten transformations to work in oXygen 7.0 by a combination of dropping the extension jars into the oXygen lib folder and amending the classpath in the oxygen.ini to include c:\Documentum\config. Whilst this still works, I would prefer to use the per scenario extensions functionality that was introduced in oXygen 7.2

I removed the custom jar files from the lib folder and placed them elsewhere on my system. I then added them to a transformation scenario via the extensions option. Everything works as it should for the first transform executed after starting oXygen. However the second and subsequent transforms return the error "java.lang.UnsatisfiedLinkError: Native Library C:\Program Files\Documentum\Shared\dmcl40.dll already loaded in another classloader". This error persists until the oXygen IDE is restarted.

I found a report of a similar bug in Eclipse with a database driver which may provide some useful information to a developer looking into the matter.

System
Windows XP SP2
Oxygen 7.2 - 8.0
JRE 1.4.2_10

Regards,
--
Darren

Posted: Tue Dec 05, 2006 2:19 pm
by Radu
Dear Darren,

This is indeed a delicate problem.
We use different class/library loaders for each transformation but there is a problem disposing them on demand at the end of the transformation (and thus releasing the dll)
I added a bug request for this, we will study it further and notify you when we come up with something.
Until then, you can use the workaround you already know (placing the jars in the lib dir...).

Best regards,
Radu.

Posted: Thu Dec 07, 2006 4:19 pm
by Mircea
Dear Darren,

We found a solution regarding this bug in the Sun's Java Virtual Machine and was included in our current development stream. It will probably be available in the next minor maintenance version.

Regards,
Mircea.