Quantcast

Extra native libraries

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Extra native libraries

Rob Daems
Hello,

I'm using the following:
wrapper version 3.5.26 (communicty) on win7 - 64bit.
Wrapper is started in 32 mode
Integration method 4 is used.

When I execute the last step to see that everything is configured correctly, by executing the bat manually, there are no problems. (see wrapper_via_bat.log)

But when I actually run it as a windows service I get problems. (see wrapper_via_service.log)

An exception is thrown. According to the developer of that program which I use, it's caused that native libraries are not loaded.
Since my program uses native dll (cppdll.dll and csdll.dll) they should be loaded, but I don't have a clue where I have to put these and where I've to configure them to be loaded.
I configured the following but it wasn't successfull:

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../lib/*.jar
wrapper.java.classpath.3=../lib/Cppdll.dll
wrapper.java.classpath.4=../lib/Csdll.dll


Nevertheless, I don't understand why it's working via the bat but not when it's not running as a service

Br, Rob



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Wrapper-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wrapper-user

wrapper.conf (11K) Download Attachment
wrapper_via_bat.log (34K) Download Attachment
wrapper_via_service.log (43K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extra native libraries

Leif Mortenson-3
Rob,
We describe this on the following page:

Java locates its native libraries using the java library path.
You are specifying them on the classpath.  In both cases this is being ignored.  But they are all located in the ../lib directory.

The most likely problem is that while java locates its native libraries using the java library path, those libraries locate ant dependent DLLs using the system PATH.
The PATH is likely different in the user account where you are running your application.
So my fist guess is that the SYSTEM user's PATH does not include the location of those dependent DLLs.
We describe how to correct this in the above link.

Please reply with the results.  If this in not the problem, I will think about it some more.

Cheers,
Leif

On Tue, May 12, 2015 at 4:13 PM, Rob Daems <[hidden email]> wrote:
Hello,

I'm using the following:
wrapper version 3.5.26 (communicty) on win7 - 64bit.
Wrapper is started in 32 mode
Integration method 4 is used.

When I execute the last step to see that everything is configured correctly, by executing the bat manually, there are no problems. (see wrapper_via_bat.log)

But when I actually run it as a windows service I get problems. (see wrapper_via_service.log)

An exception is thrown. According to the developer of that program which I use, it's caused that native libraries are not loaded.
Since my program uses native dll (cppdll.dll and csdll.dll) they should be loaded, but I don't have a clue where I have to put these and where I've to configure them to be loaded.
I configured the following but it wasn't successfull:

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../lib/*.jar
wrapper.java.classpath.3=../lib/Cppdll.dll
wrapper.java.classpath.4=../lib/Csdll.dll


Nevertheless, I don't understand why it's working via the bat but not when it's not running as a service

Br, Rob

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Wrapper-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wrapper-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extra native libraries

Rob Daems
Hello Leif,

I added both lines to the conf:
set.PATH=..%WRAPPER_FILE_SEPARATOR%lib%WRAPPER_PATH_SEPARATOR%%PATH%
set.LD_LIBRARY_PATH=..%WRAPPER_FILE_SEPARATOR%lib%WRAPPER_PATH_SEPARATOR%%LD_LIBRARY_PATH%


And I checked the the wrapper.log:
DEBUG  | wrapper  | 2015/05/13 08:14:52 |   P---C | Path=..\lib;C:\ProgramData\Oracle\Java\javapath;C:\Oracle\11.2.0.3\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Enterprise Vault\EVClient\;C:\Progra~2\Java\jre7\bin;D:\apache-ant-1.9.4\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Progra~2\Android\android-sdk\platform-tools;C:\Program Files (x86)\Microsoft\ILMerge;D:\ikvm-7.2.4630.5\bin;C:\Program Files (x86)\MySQL\MySQL Utilities\;C:\Program Files (x86)\MySQL\MySQL Utilities\Doctrine extensions for PHP\;C:\Qt\Qt5.3.2\5.3\msvc2013_64_opengl\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Progra~2\Quamotion\iMobileDevice;C:\Program Files (x86)\Jamo Solutions\M-eux Test\bin;

I noticed that "../lib" is now added to my PATH, nevertheless, the place where I copied them from, was already in my PATH (M-eux Test\bin). So actually I didn't need them to copy them to ../lib.
Correct me if I'm wrong but as far as I understand the problem of the location to the dll's is not an issue???

So the dll's are not loaded, I don't know why but I contacted the developer of the tool I use and this is his response:

Indeed our DLL’s do not get loaded.

Inside Java we load the DLL by its absolute path. We know the absolute path of the DLL because we consult the registry on the PC.

Inside the registry, we keep the path to the installation directory of M-eux Test.

The consult the registry by launching a Windows command. So we launch a process from the java code. Perhaps this causes the problems.

Strange is that we do not see the logs coming from our tool ( which can be related since we have to read the logging.xml and for locating this file, we consult the registry). So my guess is that the launch of the process fails. Can you double check and make sure that the server allows the launch of a process?


Br, Rob


2015-05-12 13:08 GMT+02:00 Leif Mortenson <[hidden email]>:
Rob,
We describe this on the following page:

Java locates its native libraries using the java library path.
You are specifying them on the classpath.  In both cases this is being ignored.  But they are all located in the ../lib directory.

The most likely problem is that while java locates its native libraries using the java library path, those libraries locate ant dependent DLLs using the system PATH.
The PATH is likely different in the user account where you are running your application.
So my fist guess is that the SYSTEM user's PATH does not include the location of those dependent DLLs.
We describe how to correct this in the above link.

Please reply with the results.  If this in not the problem, I will think about it some more.

Cheers,
Leif

On Tue, May 12, 2015 at 4:13 PM, Rob Daems <[hidden email]> wrote:
Hello,

I'm using the following:
wrapper version 3.5.26 (communicty) on win7 - 64bit.
Wrapper is started in 32 mode
Integration method 4 is used.

When I execute the last step to see that everything is configured correctly, by executing the bat manually, there are no problems. (see wrapper_via_bat.log)

But when I actually run it as a windows service I get problems. (see wrapper_via_service.log)

An exception is thrown. According to the developer of that program which I use, it's caused that native libraries are not loaded.
Since my program uses native dll (cppdll.dll and csdll.dll) they should be loaded, but I don't have a clue where I have to put these and where I've to configure them to be loaded.
I configured the following but it wasn't successfull:

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../lib/*.jar
wrapper.java.classpath.3=../lib/Cppdll.dll
wrapper.java.classpath.4=../lib/Csdll.dll


Nevertheless, I don't understand why it's working via the bat but not when it's not running as a service

Br, Rob

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Wrapper-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wrapper-user



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Wrapper-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wrapper-user

wrapper.log (43K) Download Attachment
wrapper.conf (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Extra native libraries

Leif Mortenson-3
Rob,
I really want to help out here, but at this point the problem is nothing to do with the Wrapper from what I can see.

If the code of the program you are using is not showing any log output, this is a problem in that code, and I have no way of telling what the problem is without source or related log output.
Most likely they are making some assumptions about the environment and the way it looks when running as a service is going through the code in a way that has no log output.
If the process is failing to be launched then their code should be catching that and showing an error.  If I could see that error, I would likely be able to give you some ideas.

It sounds like they need some debug output around the code to launch the process to query the registry, show its output, and then the code to load the native library.  That way we can see what is going on.

One thing to keep in mind is that the active registry space is different when running as a SYSTEM user as a service than it is when running as a standard user as a desktop application.
So depending on the registry address they are looking up, it is highly likely that the value they are looking for is in a different location.

If the product you are working with is a company then I would suggest sending them your config with the Wrapper and asking them to look into making it work on their end.
If they are dealing with accessing the registry, outside of Java, there will likely be some things that need to be adjusted when running as a service.

Feel free to keep me in the loop and I will help as possible.

Cheers,
Leif


On Wed, May 13, 2015 at 3:27 PM, Rob Daems <[hidden email]> wrote:
Hello Leif,

I added both lines to the conf:
set.PATH=..%WRAPPER_FILE_SEPARATOR%lib%WRAPPER_PATH_SEPARATOR%%PATH%
set.LD_LIBRARY_PATH=..%WRAPPER_FILE_SEPARATOR%lib%WRAPPER_PATH_SEPARATOR%%LD_LIBRARY_PATH%


And I checked the the wrapper.log:
DEBUG  | wrapper  | 2015/05/13 08:14:52 |   P---C | Path=..\lib;C:\ProgramData\Oracle\Java\javapath;C:\Oracle\11.2.0.3\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Enterprise Vault\EVClient\;C:\Progra~2\Java\jre7\bin;D:\apache-ant-1.9.4\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Progra~2\Android\android-sdk\platform-tools;C:\Program Files (x86)\Microsoft\ILMerge;D:\ikvm-7.2.4630.5\bin;C:\Program Files (x86)\MySQL\MySQL Utilities\;C:\Program Files (x86)\MySQL\MySQL Utilities\Doctrine extensions for PHP\;C:\Qt\Qt5.3.2\5.3\msvc2013_64_opengl\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Progra~2\Quamotion\iMobileDevice;C:\Program Files (x86)\Jamo Solutions\M-eux Test\bin;

I noticed that "../lib" is now added to my PATH, nevertheless, the place where I copied them from, was already in my PATH (M-eux Test\bin). So actually I didn't need them to copy them to ../lib.
Correct me if I'm wrong but as far as I understand the problem of the location to the dll's is not an issue???

So the dll's are not loaded, I don't know why but I contacted the developer of the tool I use and this is his response:

Indeed our DLL’s do not get loaded.

Inside Java we load the DLL by its absolute path. We know the absolute path of the DLL because we consult the registry on the PC.

Inside the registry, we keep the path to the installation directory of M-eux Test.

The consult the registry by launching a Windows command. So we launch a process from the java code. Perhaps this causes the problems.

Strange is that we do not see the logs coming from our tool ( which can be related since we have to read the logging.xml and for locating this file, we consult the registry). So my guess is that the launch of the process fails. Can you double check and make sure that the server allows the launch of a process?


Br, Rob


2015-05-12 13:08 GMT+02:00 Leif Mortenson <[hidden email]>:
Rob,
We describe this on the following page:

Java locates its native libraries using the java library path.
You are specifying them on the classpath.  In both cases this is being ignored.  But they are all located in the ../lib directory.

The most likely problem is that while java locates its native libraries using the java library path, those libraries locate ant dependent DLLs using the system PATH.
The PATH is likely different in the user account where you are running your application.
So my fist guess is that the SYSTEM user's PATH does not include the location of those dependent DLLs.
We describe how to correct this in the above link.

Please reply with the results.  If this in not the problem, I will think about it some more.

Cheers,
Leif

On Tue, May 12, 2015 at 4:13 PM, Rob Daems <[hidden email]> wrote:
Hello,

I'm using the following:
wrapper version 3.5.26 (communicty) on win7 - 64bit.
Wrapper is started in 32 mode
Integration method 4 is used.

When I execute the last step to see that everything is configured correctly, by executing the bat manually, there are no problems. (see wrapper_via_bat.log)

But when I actually run it as a windows service I get problems. (see wrapper_via_service.log)

An exception is thrown. According to the developer of that program which I use, it's caused that native libraries are not loaded.
Since my program uses native dll (cppdll.dll and csdll.dll) they should be loaded, but I don't have a clue where I have to put these and where I've to configure them to be loaded.
I configured the following but it wasn't successfull:

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../lib/*.jar
wrapper.java.classpath.3=../lib/Cppdll.dll
wrapper.java.classpath.4=../lib/Csdll.dll


Nevertheless, I don't understand why it's working via the bat but not when it's not running as a service

Br, Rob


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Wrapper-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wrapper-user
Loading...