tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ludwig <>
Subject Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)
Date Mon, 02 Feb 2009 01:51:34 GMT
Caldarale, Charles R schrieb am 29.01.2009 um 22:45:40 (-0600):
> > From: Michael Ludwig []
> > Subject: Re: UnsatisfiedLinkError in Windows Service (tomcat6w/5w.exe)
> >
> > -Djava.library.path=C:\Server;C:\src\BerkeleyDbXml\dbxml-2.4.1
> > 6\bin\debug;...
> Is *src* really the right place to find the DLLs?

Hi Charles. Yes, it is. I created C:\src to put source code there.
I compiled that souce code, and the DLLs go to the bin\debug

> I realize it's long, but can you post the full string?

Trying to reproduce this error, I noticed to my surprise that it
wouldn't occur.

It turns out that the error only occurs for some of the DLLs.

  libdb_java46d.dll         # can be in java.library.path or PATH
  libdbxml_java24d.dll      # ditto

  libdb46d.dll              # must reside in a PATH directory
  libdbxml24d.dll           # ditto

  xerces-c_2_8D.dll         # ditto
  xqilla21d.dll             # ditto

The Java bridge DLLs (or whatever they're called) can be moved to a
directory only contained in java.library.path, but not in PATH. The
other libraries must be in a PATH directory in order to be loaded.

> > So I guess there is something wrong with Tomcat here.

So I now guess I was wrong here, and of course you were right. Sorry for
blaming Tomcat. The problem seems to be with how the libdb(xml)_java
libraries load other libraries. So this is probably related to BDB and
the Windows API, or the build - but not to Tomcat.

> I can't see how, unless there's something really odd going on with the
> classloader hierarchy.  Can you post the full stack trace of the
> UnsatisfiedLinkError?  I wonder if there's a custom classloader that's
> getting in the way, since I don't have any problems with Tomcat's set
> of classloaders accessing native libraries specified by the
> java.library.path setting.

Here's a stack trace, in case you still think it is relevant. The error
message mentions the *_java library, but I think this is only because
that library has a dependency on the libdb46, and that one isn't found,
which the error message does not reveal.

Michael Ludwig

22.01.2009 23:14:12 org.apache.catalina.core.StandardContext listenerStart
SCHWERWIEGEND: Exception sending context initialized event to listener instance of class milu.dbxml.DbXmlInitExit
java.lang.UnsatisfiedLinkError: no libdb_java46 in java.library.path
  at java.lang.ClassLoader.loadLibrary(
  at java.lang.Runtime.loadLibrary0(
  at java.lang.System.loadLibrary(
  at com.sleepycat.db.internal.db_javaJNI.<clinit>(
  at com.sleepycat.db.internal.DbEnv.<init>(
  at com.sleepycat.db.EnvironmentConfig.createEnvironment(
  at com.sleepycat.db.EnvironmentConfig.openEnvironment(
  at com.sleepycat.db.Environment.<init>(
  at milu.dbxml.DbXmlInitExit.contextInitialized(
  at org.apache.catalina.core.StandardContext.listenerStart(
  at org.apache.catalina.core.StandardContext.start(
  at org.apache.catalina.core.ContainerBase.addChildInternal(
  at org.apache.catalina.core.ContainerBase.addChild(
  at org.apache.catalina.core.StandardHost.addChild(
  at org.apache.catalina.startup.HostConfig.deployDirectory(
  at org.apache.catalina.startup.HostConfig.deployDirectories(
  at org.apache.catalina.startup.HostConfig.deployApps(
  at org.apache.catalina.startup.HostConfig.start(
  at org.apache.catalina.startup.HostConfig.lifecycleEvent(
  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
  at org.apache.catalina.core.ContainerBase.start(
  at org.apache.catalina.core.StandardHost.start(
  at org.apache.catalina.core.ContainerBase.start(
  at org.apache.catalina.core.StandardEngine.start(
  at org.apache.catalina.core.StandardService.start(
  at org.apache.catalina.core.StandardServer.start(
  at org.apache.catalina.startup.Catalina.start(
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(
  at java.lang.reflect.Method.invoke(
  at org.apache.catalina.startup.Bootstrap.start(
  at org.apache.catalina.startup.Bootstrap.main(

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message