Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dtp-dev] Re: DTP support for SQLite DB

Hey Brian,


> Just as an aside, I just tested in a workspace where I have two
> different SQLite database files. The driver loads successfully the
> first time for either of my two profiles. And I can connect and
> disconnect from that one just fine. But I am not allowed to connect
> to a second database. I am getting an unsatisified link error.
>
> Unable to load sqlite: java.lang.UnsatisfiedLinkError: Native
> Library C:\Program Files\Java\j2re1.4.2_12\bin\sqlite_jni.dll
> already loaded in another classloader
>

If you are seeing this error, then we haven't fixed the problem.  This was
the error listed in the original bug report.  We need to investigate what
is going on with the classloaders.  Try setting a breakpoint in the
DriverInstance.getClassLoader() to see if a new classloader is being
created.  It may be that the old classloader has been marked for deletion,
but not yet reclaimed.  It could also be that the JVM doesn't release the
library, regardless of whether or not the classloader has been reclaimed,
or that the library hasn't been unloaded.  I'm not sure what the specified
behavior is for these cases.

Another simple test would be to store the classloader in a plain old member
variable instead of using a SoftReference.  If that fixes things, perhaps
we should leave the fancier stuff for a future release.

Thanks,
Rob



Back to the top