Tuan Nguyen [http://community.jboss.org/people/tnguyen_75] created the 
discussion

"Re: How to make Jboss server recognize Windows DLL"

To view the discussion, visit: http://community.jboss.org/message/603967#603967

--------------------------------------------------------------
I dowloaded the utility, dependencywalker from  http://www.dependencywalker.com 
http://www.dependencywalker.com and ran against the main vix.dll. I got the 
following errors:

(1) DEVMGR.DLL Error opening file: The system cannot file the find specified.
(2) MSJAVA.DLL      Error opening file: The system cannot file the find 
specified.
Warning: At least one delay-load dependency module was not found.

I used java.librabry.path instead of jna.library.path. 
Change in run.conf.bat:
rem # Path to jna.library.path
set "JAVA_OPTS=%JAVA_OPTS% -Djava.library.path=C:\Software\VMWare\VSphere-4.1"

 Java code:
import com.vmware.vim25.*;
import com.vmware.vim25.mo.*;
import com.vmware.vix.*;
import com.vmware.vix.util.*;

    private static String user = "administrator";
    private static String pwd = "cf@dp@$$w0rd";
  static {


              System.setProperty("java.library.path", 
"C:\\Software\\VMWare\\VSphere-4.1");
   }

.......

 public boolean vmCmpDeploy (String osType, String vmConfigPath) {

                VixVSphereHandle hostHandle = null;


                String guser;
                String gpwd;
                String guestenvip;
                VixError err;
                OperatingSystems os;

                try {

              if (osType.equalsIgnoreCase("Windows"))
                        os = OperatingSystems.windows;
              else if (osType.equalsIgnoreCase("Linux"))
                        os = OperatingSystems.linux;
              else if (osType.equalsIgnoreCase("Linux"))
                        os = OperatingSystems.macintosh;
              else
                        os = OperatingSystems.valueOf("Solaris");

          //java.lang.UnsatisfiedLinkError: happens at this line           
                    hostHandle = new VixVSphereHandle(vmURL, user, pwd);
.......

Here's the error in the log:

2011-05-06 15:06:46,259 ERROR [STDERR] (WorkManager(2)-3) 
java.lang.UnsatisfiedLinkError: Unable to load library 'vix': The specified 
module could not be found.
2011-05-06 15:06:46,259 ERROR [STDERR] (WorkManager(2)-3)           at 
com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:163)
2011-05-06 15:06:46,259 ERROR [STDERR] (WorkManager(2)-3)           at 
com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:236)
2011-05-06 15:06:46,275 ERROR [STDERR] (WorkManager(2)-3)           at 
com.sun.jna.Library$Handler.<init>(Library.java:140)
2011-05-06 15:06:46,275 ERROR [STDERR] (WorkManager(2)-3)           at 
com.sun.jna.Native.loadLibrary(Native.java:379)
2011-05-06 15:06:46,275 ERROR [STDERR] (WorkManager(2)-3)           at 
com.sun.jna.Native.loadLibrary(Native.java:364)
2011-05-06 15:06:46,275 ERROR [STDERR] (WorkManager(2)-3)           at 
com.vmware.vix.VixLibrary.<clinit>(VixLibrary.java:52)
2011-05-06 15:06:46,275 ERROR [STDERR] (WorkManager(2)-3)           at 
com.vmware.vix.VixHandle.<init>(VixHandle.java:39)
2011-05-06 15:06:46,275 ERROR [STDERR] (WorkManager(2)-3)           at 
com.vmware.vix.VixHandle.<clinit>(VixHandle.java:38)

Appreciate any help from Jboss community!

Tuan
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/603967#603967]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to