Start a Conversation

Unsolved

This post is more than 5 years old

1996

June 15th, 2011 02:00

Windows server: Error loading XAM Library or its dependencies

Hi, I've seen this error in some other posts but the solutions are not working

I'm using Windows 2008 server and tried to set the enviroment virable to /lib32 and/or lib64 on any way possible

The most funny thing is that we got another machine with OpenSuse on it and just setting the path to /lib32 works perfectly

What are we missing on Windows?

208 Posts

June 17th, 2011 13:00

Hello -

Our system is java based and runs on both Linux and Windows 2008R2 so it seems we have similar setups. In the launch script for our software on Windows we simply have this setting and everything loads up fine:

set PATH=C:\Windows\system32;C:\Windows;C:\opt\emc\VIM-1.0\lib64;c:\Program Files\Java\jdk\bin

Microsoft's SysInternals Process Monitor (http://technet.microsoft.com/en-us/sysinternals) is an easy way to watch a Windows process as it tries to find/load DLLs and quickly understand where it expects to find them.

Good Luck,

Mike H

2 Posts

June 17th, 2011 15:00

Thanks for your help,

I did that already, what I do here is using a java service wrapper (http://wrapper.tanukisoftware.com/doc/english/download.jsp) and try to run my program as a service, everytime I try to start it just gives me that error, the strange thing is it only gives me 1 line error, doesn't indicate which line of code or anything else.

I'll try looking the processes

There might be a chance that the service wrapper itself is unable to work with those libs in windows 2008 server?

Cheers,

Pablo

1 Message

June 18th, 2011 00:00

Pablo,

When exactly are you getting the error?  Java loads its native libraries by looking at the native library path defined in the Wrapper's configuration file:

http://wrapper.tanukisoftware.com/doc/english/prop-java-library-path-n.html

Some simple JNI libraries will work with just that, but others themselves depend on additional libraries.  In those cases, the secondary libraries are located and loaded by the system using the PATH on Windows, DYLD_LIBRARY_PATH on Mac, or LD_LIBRARY_PATH on other NIX platforms.

When you run Java standalone in a command prompt it will use the PATH defined for your current user.  When running as a service however, it will use the SYSTEM user's PATH.


We usually suggest adding the location of the required libraries to the PATH in the Wrapper.conf so it will always work regardless of where run.  This is described on the above page, but it can be done in a platform independent way as follows:

set.PATH=..%WRAPPER_FILE_SEPARATOR%lib%WRAPPER_PATH_SEPARATOR%%PATH%
set.LD_LIBRARY_PATH=..%WRAPPER_FILE_SEPARATOR%lib%WRAPPER_PATH_SEPARATOR%%LD_LIBRARY_PATH%
set.DYLD_LIBRARY_PATH=..%WRAPPER_FILE_SEPARATOR%lib%WRAPPER_PATH_SEPARATOR%%DYLD_LIBRARY_PATH%

Another possibility is that you are not using the JVM that you are indending to.  This can happen if you tell the Wrapper to locate your JVM on the PATH like this:


wrapper.java.command=java

We recommend being more specific:

wrapper.java.command=%JAVA_HOME%/bin/java


http://wrapper.tanukisoftware.com/doc/english/prop-java-command.html

Hope this helps.

Cheers,

Leif

No Events found!

Top