tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ludwig <mil...@gmx.de>
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 [mailto:milu71@gmx.de]
> > 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
subdirectory.

> 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(ClassLoader.java:1709)
  at java.lang.Runtime.loadLibrary0(Runtime.java:823)
  at java.lang.System.loadLibrary(System.java:1030)
  at com.sleepycat.db.internal.db_javaJNI.<clinit>(db_javaJNI.java:38)
  at com.sleepycat.db.internal.DbEnv.<init>(DbEnv.java:264)
  at com.sleepycat.db.EnvironmentConfig.createEnvironment(EnvironmentConfig.java:1023)
  at com.sleepycat.db.EnvironmentConfig.openEnvironment(EnvironmentConfig.java:976)
  at com.sleepycat.db.Environment.<init>(Environment.java:29)
  at milu.dbxml.DbXmlInitExit.contextInitialized(DbXmlInitExit.java:34)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
  at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
  at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
  at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
  at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
  at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
  at org.apache.catalina.core.StandardService.start(StandardService.java:516)
  at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message