|
From: Dominik.S <Dom...@se...> - 2006-07-03 17:16:23
|
Hi, i have a problem when using the wrapper. I use the wrapper after the installation of some software to check (under windows) if the user has admin rights. This all works perfect "standalone", but when i am using the wrapper=20 within my installer (izPack by the way) i get an error when the wrapper tries to load the DLL: I just copy'd the wrapper.dll to a directory and have written an own izpack panel to check for windows userrights using the wrapper. But when the wrapper tries to acccess the "wrapper.dll" I get the following error: Wrapper (Version 3.2.0) http://wrapper.tanukisoftware.org WARNING - The wrapper.native_library system property was not set. Using the default value, 'wrapper'. 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. I can't figure out what should be wrong with the wrapper.dll... Any ideas what could be the reason for this problem? Thanks in advance, dominik ###########################################=0A= =0A= This message has been scanned by F-Secure Anti-Virus.=0A= For more information, connect to http://www.f-secure.com/ |
|
From: Leif M. <le...@ta...> - 2006-07-03 17:28:21
|
Dominik,
The first message shouldn't ever happen if both the wrapper.exe and
wrapper.jar are
both version 3.2.0.
The second could happen for a number of reasons. The most likely is
a file / directory
permissions problem. The wrapper is seeing the file, but is not able to
load it for some
reason. It is rare, but I have also seen cases where users have done
things like check
the wrapper.dll into CVS as a text file. It then ends up getting
corrupted on check out.
Could you set the wrapper.debug=true property in your wrapper.conf.
Starting with
a clean wrapper.log, rerun your application and then post the resulting
log file. I should
be able to tell you a little more about what is going on.
Cheers,
Leif
Dominik.S wrote:
> Hi,
>
> i have a problem when using the wrapper.
> I use the wrapper after the installation of some software to check
> (under windows) if the user has admin rights. This all works perfect
> "standalone", but when i am using the wrapper
> within my installer (izPack by the way) i get an error when the wrapper
> tries to load the DLL:
>
> I just copy'd the wrapper.dll to a directory and have written an own
> izpack panel to check for windows userrights using the wrapper. But when
> the wrapper tries to acccess the "wrapper.dll" I get the following
> error:
>
>
> Wrapper (Version 3.2.0) http://wrapper.tanukisoftware.org
>
> WARNING - The wrapper.native_library system property was not
> set. Using the default value, 'wrapper'.
>
> 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.
>
>
> I can't figure out what should be wrong with the wrapper.dll...
>
> Any ideas what could be the reason for this problem?
>
> Thanks in advance,
> 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
>
>
|
|
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/
|
|
From: <Ale...@Qu...> - 2006-07-04 09:00:52
Attachments:
wrapper.log
|
I have had this same problem, under Windows XP only. The procedure which
works perfectly under Windows 2000 fails as Dominik says under Windows XP.
I mentioned this a couple of months ago, but a panic at the time stopped
me following it up. I attach a wrapper.log with debug turned on. The dll
is in the place spcified and appears to be uncorrupted.
"Dominik.S" <Dom...@se...>
Sent by: wra...@li...
04/07/2006 09:26
Please respond to
wra...@li...
To
<wra...@li...>
cc
Subject
Re: [Wrapper-user] Unable to load the Wrapper's nativelibrary
'wrapper.dll'
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
|
|
From: Dominik.S <Dom...@se...> - 2006-07-04 09:06:28
|
> I have had this same problem, under Windows XP only. The=20 > procedure which works perfectly under Windows 2000 fails as=20 > Dominik says under Windows XP.=20 > I mentioned this a couple of months ago, but a panic at the=20 > time stopped me following it up. I attach a wrapper.log with=20 > debug turned on. The dll is in the place spcified and appears=20 > to be uncorrupted. hi,=20 well i didn't mention it, but i am running windows 2000 (not xp!!!).=20 I have compared the wrapper.dll as well as wrapper.jar with "fresh downloaded" ones and cygwin_diff tells me that both files are equivalent to the "fresh" ones... Regards,=20 dominik ###########################################=0A= =0A= This message has been scanned by F-Secure Anti-Virus.=0A= For more information, connect to http://www.f-secure.com/ |
|
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
>
>
|