Top.Mail.Ru
March 29th, 2004 - Java developers — LiveJournal
? ?

Java developers

March 29th, 2004
 

03:44 pm - simplicitynow

Hello. I am trying to write a java program that will access a text file that is generated by a cgi script on an HTTP server. I'm using URLConnection to connect to the URL, and when I call getContentType(), it returns "application/octet-stream" which I believe means that java doesnt know what to do with it. So after getting the content I have no idea what to do with the Object - I'm not even sure if the cgi script ran and generated the file I want, or if it's trying to get the cgi script itself.
Read more...Collapse )

05:16 pm - banana - JAAS trying to log in...

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.
Powered by LiveJournal.com