I have a rather peculiar problem using a single sign-on native library for windows in a windows service vrated with the wrapper (the library is ntlmauth.dll from http://jtds.sourceforge.net\). The library basically gets domain, username and password of the currently-logged-on user in windows. We want to use this single sign-on system on a datalogger project were developing so we can install our software on new computeres without having to ask for the user´s windows account information. Im linking to the native library using java.library.path in wrapper.conf and i should be locating the library fine as when i temporarily remove it i get a "java.lang.IllegalStateException: Native SSPI library not loaded." exception.
Here´s my problem. When i run wrapper.exe from a console (using wrapper.exe -c wrapper.conf) everything works fine, or even if i just run the program with a java.exe command. Im using the user´s sign-on information to create a DCom-connection and i can do so without explicitly typing in the windows user´s username and password. Great. When i create a windows service with the wrapper batch-files , however, and start it, my program is unable to make the DCom-connection and i get a nondescript SocketTimeoutException. I do know the actual windows user´s username and password on our testmachine and when i use those directly to create the DCom-connection everything works fine, even as a windows service.
Any ideas as to what the core of the problem might be? My program seems to only fail when i install it as a windows service. Could it be because of somehow differing environments between a console and a windows service? I've tried setting account and password with the wrapper configuration properties, wrapper.ntservice.account, wrapper.ntservice.password, but this still doesnt work.
What am i missing here?