29 March 2004 - java_dev (original) (raw)

I'm trying to get JAAS user authentication working. Specifically, I want to have users on Windows NT(2000, etc) domains authenticated with their Windows user name and password. I found a nice wrapper for some code to do that, and found out why my (i.e. Oracle's) app server wouldn't load the authentication classes.

So, now my problem. The windows authentication is native code accessed with JNI and the DLL can't be found:

javax.security.auth.login.LoginException: java.lang.UnsatisfiedLinkError: no NTSystem in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1349) at java.lang.Runtime.loadLibrary0(Runtime.java:749) at java.lang.System.loadLibrary(System.java:820) at com.tagish.auth.win32.NTSystem.(NTSystem.java:19) (etc.)

The DLL is on the Windows path, and therefore is in java.library.path, so something funny's going on.

Everything works fine from the command line (i.e. outside Oracle's app server), so what do I do? My guess (since I had to circumvent Oracle's class loader to get the authentication classes to load) is that there is a similar work round for loading a DLL. Any suggestions?

If you're playing along at home, you need to tweak java.security in your JRE lib directory to make the Tagish login classes work - add the login.config.url.1=file:[somepath]/tagish.login entry at the end.