|
From: Dominik.S <Dom...@se...> - 2006-07-04 08:26:54
|
Hi,
> The first message shouldn't ever happen if both the=20
> 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 =3D false;
final String javaLibraryPath =3D pathToWrapperLibDir + ";" +
defaultJavaLibraryPath;
System.setProperty("java.library.path", javaLibraryPath);
// set some wrapper properties:
System.setProperty("wrapper.debug", "TRUE");
System.setProperty("wrapper.native_library", "wrapper");
=20
// Check if wrapper.dll is readable:
File wrapperDll =3D 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("*********************");
=20
// Get all groups the user belongs to:
final WrapperGroup[] groups =3D =
WrapperManager.getUser(true).getGroups();
WrapperWin32Group winGroup;
for(int i=3D0; i<groups.length; i++) {
winGroup =3D (WrapperWin32Group) groups[i];
if(winGroup.getSID().equals(ADMINISTRATORS_GROUP_SID)) {
userHasAdministratorRights =3D true;
break;
}
}
### ###
######################################################
So, i think the wrapper.exe is never used (but perhaps i am completly
wrong).=20
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
###########################################=0A=
=0A=
This message has been scanned by F-Secure Anti-Virus.=0A=
For more information, connect to http://www.f-secure.com/
|