Loading Native DLLs in JSP/servlets

B

Brett Slocum

OK, I've got an object that needs to load a native DLL. So, I put the
System.loadLibrary(...) call in the constructor for that object. This
object is called from three different JSPs that instantiate the object.

When I run the JSP for the first time, I get the following error
message (even though the JavaDoc says that System.loadLibrary() won't
throw an exception, if the library is already loaded):

java.lang.UnsatisfiedLinkError: Native Library
C:\WINNT\AcordeInterfaceJNI.dll already loaded in another classloader

So, what's going on and how can I get this to work? Has anyone done
something like this before?
 
T

Tom Dyess

Brett Slocum said:
OK, I've got an object that needs to load a native DLL. So, I put the
System.loadLibrary(...) call in the constructor for that object. This
object is called from three different JSPs that instantiate the object.

When I run the JSP for the first time, I get the following error
message (even though the JavaDoc says that System.loadLibrary() won't
throw an exception, if the library is already loaded):

java.lang.UnsatisfiedLinkError: Native Library
C:\WINNT\AcordeInterfaceJNI.dll already loaded in another classloader

So, what's going on and how can I get this to work? Has anyone done
something like this before?

I get this when calling a COM object through JACOB when Eclipse
automatically builds and reloads the context after saving a file and Tomcat
is running in debug mode. I don't know if this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top