|
From: Leif M. <le...@ta...> - 2006-07-04 15:19:49
|
Dominik,
Ouch. That is not really supported... :-)
The problem is that you are setting your java library path from
within the JVM. When
the WrapperManager code attempts to debug why the wrapper.dll is not
being loaded, it
is looking at this library path and everything appears to be fine.
The problem is that the JVM's main class loader has already decided
on the library
path that it will use to locate its native libraries long before you set
that system property.
I bet that if you modify your java command line to set the correct
library path from
the command line, things will start working.
Cheers,
Leif
Dominik.S wrote:
> Hi,
>
>
>> The first message shouldn't ever happen if both the
>> wrapper.exe and wrapper.jar are both version 3.2.0.
>>
>
> well what i am doing is something different. I am within a java
> application where i use the wrapper.jar to check if a w32 user is in the
> "Administrators" group. So the wrapper is called out of a java
> application:
>
> Here is my code:
>
> ######################################################
> ### ###
> boolean userHasAdministratorRights = false;
> final String javaLibraryPath = pathToWrapperLibDir + ";" +
> defaultJavaLibraryPath;
> System.setProperty("java.library.path", javaLibraryPath);
>
> // set some wrapper properties:
> System.setProperty("wrapper.debug", "TRUE");
> System.setProperty("wrapper.native_library", "wrapper");
>
> // Check if wrapper.dll is readable:
> File wrapperDll = new File (pathToWrapperDll);
> System.out.println("*********************");
> System.out.println("java.library.path : " +
> System.getProperty(PROPERTY_JAVA_LIBRARY_PATH));
> System.out.println("wrapper.dll location: " + pathToWrapperDll);
> System.out.println("wrapper.dll is file : " + wrapperDll.isFile());
> System.out.println("wrapper.dll can read: " + wrapperDll.canRead());
> System.out.println("*********************");
>
> // Get all groups the user belongs to:
> final WrapperGroup[] groups = WrapperManager.getUser(true).getGroups();
> WrapperWin32Group winGroup;
> for(int i=0; i<groups.length; i++) {
> winGroup = (WrapperWin32Group) groups[i];
> if(winGroup.getSID().equals(ADMINISTRATORS_GROUP_SID)) {
> userHasAdministratorRights = true;
> break;
> }
> }
> ### ###
> ######################################################
>
>
> So, i think the wrapper.exe is never used (but perhaps i am completly
> wrong).
>
> Also i do not know hot to tell the wrapper where he could look for the
> wrapper.conf (since i do not use the wrapper.exe but a java application
> that uses wrapper.jar. Thats why i set the wrapper parameters by:
> System.setProperty("wrapper.debug", "TRUE");
>
>
> I get the following output when running the application.
>
>
> ######################################################
> ### ###
> *********************
> java.library.path :
> C:\Programme\SOME_APPLICATION\ext\wrapper\lib;C:\WINNT\system32;AND-SOME
> -MORE
> wrapper.dll location:
> C:\Programme\SOME_APPLICATION\ext\wrapper\lib\wrapper.dll
> wrapper.dll is file : true
> wrapper.dll can read: true
> *********************
> WrapperManager class initialized by thread: AWT-EventQueue-0 Using
> classloader: sun.misc.Launcher$AppClassLoader@133056f
> Wrapper (Version 3.2.0) http://wrapper.tanukisoftware.org
>
> Wrapper Manager: JVM #1
> Running a 32-bit JVM.
> Wrapper Manager: Registering shutdown hook
> Wrapper Manager: Not using wrapper. (key not specified)
> Load native library. One or more attempts may fail if platform specific
> libraries do not exist.
> Loading native library failed: wrapper-windows-x86-32.dll Cause:
> java.lang.UnsatisfiedLinkError: no wrapper-windows-x86-32 in
> java.library.path
> Loading native library failed: wrapper.dll Cause:
> java.lang.UnsatisfiedLinkError: no wrapper in java.library.path
>
> WARNING - Unable to load the Wrapper's native library 'wrapper.dll'.
> The file is located on the path at the following location but
> could not be loaded:
> C:\Programme\SOME_APPLICATION\ext\wrapper\lib\wrapper.dll
> Please verify that the file is readable by the current user
> and that the file has not been corrupted in any way.
> One common cause of this problem is running a 32-bit version
> of the Wrapper with a 64-bit version of Java, or vica versa.
> This is a 32-bit JVM.
> System signals will not be handled correctly.
>
> Java Version : 1.5.0_07-b03 Java HotSpot(TM) Client VM
> Java VM Vendor : Sun Microsystems Inc.
>
> Wrapper Manager: ShutdownHook started
> WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook
> Send a packet STOP : 0
> Thread, Wrapper-Shutdown-Hook, handling the shutdown process.
> Send a packet STOPPED : 0
> Wrapper Manager: ShutdownHook complete
> ### ###
> ######################################################
>
>
>
> Regards,
> dominik
> ###########################################
>
> This message has been scanned by F-Secure Anti-Virus.
> For more information, connect to http://www.f-secure.com/
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
|